Beginning with FxFactory 7.1.1, clients of the FxFactory Framework are immediately notified when a license is activated inside the FxFactory app.
If your app or plug-in uses the FxFactory framework, note that from FxFactory 7.1.1 onward, calls to FxFactoryGetLicensingStatus()
may return a different value over time. You are encouraged to call that function as often as you need, in order to determine if the product is running in trial mode. If you wish to be notified when license status has changed, consider 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.
There are a few things a third-party application may choose to do in response to a change: