PAGLicenseManager Class Reference

Inherits from NSObject
Declared in PAGLicenseManager.h

Overview

The manager is used to manage all licenses. You only need to add/load licenses to this manager. When you load the encrypted PAG file, you can automatically decrypt the PAG file

+ LoadSDKLicense:key:appID:

Load PAG Enterprise SDK license from the specified path. Return InvalidParameter if the file doesn’t exist or the data aren’t a valid license file or the license is not used for the current application, Return LicenseExpired if the license has expired. Note: If load failure, the watermark will always be displayed. If load success, the watermark can be removed. Suggestion: If your application uses online license, at the beginning of your app startup, first download the license file asynchronously, manage the license file yourself, and then call LoadSDKLicense to load the downloaded license

+ (PAGLicenseResult)LoadSDKLicense:(NSString *)path key:(NSString *)key appID:(NSString *)appID

Parameters

key

the authentication key

licensePath

the local path of authentication file

appId

The license can only be used for the appId application

Declared In

PAGLicenseManager.h

+ LoadSDKLicense:size:key:appID:

Load PAG Enterprise SDK license from the specified license bytes. Return InvalidParameter if the data aren’t a valid license file or the license is not used for the current application, Return LicenseExpired if the license has expired. Note: If load failure, the watermark will always be displayed. If load success, the watermark can be removed.

+ (PAGLicenseResult)LoadSDKLicense:(void *)bytes size:(NSUInteger)size key:(NSString *)key appID:(NSString *)appID

Parameters

bytes

the data bytes of authentication file

size

the size of bytes

key

the authentication key

appId

The authentication can only be used for the appId application

Declared In

PAGLicenseManager.h

+ AddFileLicense:

Add a license to the manager from the specified license path to decrypt the encrypted PAG file. Return InvalidParameter if the file doesn’t exist or the data aren’t a valid license file or the license is not used for the current application. Return LicenseExpired if the license has expired

+ (PAGLicenseResult)AddFileLicense:(NSString *)path

Declared In

PAGLicenseManager.h

+ AddFileLicense:size:

Add a license to the manager from the specified license data to decrypt the encrypted PAG file. Return InvalidParameter if the data are not a valid license file or the license is not used for the current application, Return LicenseExpired if the license has expired.

+ (PAGLicenseResult)AddFileLicense:(const void *)bytes size:(size_t)length

Declared In

PAGLicenseManager.h

+ GetSDKExpiredDate

+ (NSString *)GetSDKExpiredDate