Instant Product Activation
Beginning with FxFactory 7.1.1, clients of the FxFactory framework are immediately notified when a license is activated inside the FxFactory app. This applies both to licenses activated for the current user, as well as licenses activated for the all users on the system1)
If your app or plug-in uses the FxFactory framework you should note that, from FxFactory 7.1.1 onward, calls to FxFactoryGetLicensingStatus()
may return a different value while your code is running. If you wish to be notified when a license has its status changed, you should begin using the new FxFactoryRegisterLicensingStatusChangeHandler()
API:
#import <FxFactory/FxFactory.h> FxFactoryLicensingStatus status = kFxFactoryLicensingStatusProductUnlicensed; if ( FxFactoryGetLicensingStatus != NULL ) { status = FxFactoryGetLicensingStatus(...); if ( FxFactoryRegisterLicensingStatusChangeHandler != NULL ) { FxFactoryRegisterLicensingStatusChangeHandler( ..., ..., ^(FxFactoryLicensingStatus status, id _Nullable context) { // Product may have gone from unlicensed to licensed, or vice versa }); } }
The context
parameter to FxFactoryRegisterLicensingStatusChangeHandler
allows you to provide a reference to an Objective-C object whose reference is passed back to the handler. As for many block-based APIs in Objective-C, the idea is to avoid retain cycles by having the block maintain any strong references to its caller. The context
object is retained weakly by the FxFactory framework in order to avoid retain cycles.
Next Steps
There are a few things a third-party application may choose to do in response to a change: - Hide UI elements that mention trial mode / unavailable features, as well as any buttons that initiate the purchase process through FxFactory. - Display a “Thank you” message to the user, perhaps with information about the features that have been unlocked. - Remind the user of any steps he or she must take in order to remove any watermarks. For example, visual or audio plug-ins whose output may have been cached by the host application, should be re-rendered in order for the watermark to be removed2)