Licensing API

Everything on this page comes from TILicense.h. The header is header-only and every function in it is static inline __attribute__((always_inline, visibility("hidden"))), so the code is compiled into your tweak rather than called across a library boundary. There is no exported symbol named after the licence check for anyone to find.

Getting the header

TILicense.h ships with the TI_Support headers. Include it and link TI_Support.dylib, which is installed at /Library/TweakInject/TI_Support.dylib.

Include
#import "TILicense.h"

What is available

NameKindPurpose
TILicenseCheck FunctionPlain yes or no. Verifies the signed receipt.
TIL_DISPATCH MacroCalls a function only when licensed, with no branch.
TIL_DISPATCH_OR MacroAs above, with your own fallback instead of a stub.
TIL_DISPATCH_CALL MacroSame, for a function that takes arguments and returns a value.
TIL_DISPATCH_FN MacroResolves to a function pointer rather than calling it.
TIL_GUARD_PTR MacroPasses a pointer through, or poisons it when unlicensed.
TIL_HOOK MacroInstalls an MSHookFunction hook only when licensed.

How the decision is made

The macros do not call TILicenseCheck directly. They use an internal dual check that combines the inline receipt verification with a token obtained from the installed TI_Support.dylib, and multiplies the two results. Both have to agree, so removing the dylib does not turn the check into an unconditional pass. It produces zero, which is the unlicensed answer.

The result is an integer, 1 or 0, never a boolean that branches. That is what lets the macros compute addresses from it instead of jumping on it. See Dispatch Macros for what that buys and what it does not.

What this is not

This is not a defence against someone determined, patient and running your code on their own hardware. Nothing shipped to a user's machine is. What it removes is the single obvious edit: there is no one branch whose inversion unlocks the tweak, and no exported symbol to search for.