GSK

Objective-C

@interface GSK : NSObject

Swift

class GSK : NSObject

Entry point of the SDK. Use this to initialize the SDK with your license key.

  • Must be called first with a valide license key to enable the SDK.

    Warning

    Important This method must be called before any use of the SDK methods.

    All the SDK errors return proper errors in that case and you can handle them to ensure you provide a good “degraded” experience. For instance, you can prompt the user to update the application to use the scanning feature in case they use a version of the application with an expired license key.

    Declaration

    Objective-C

    + (BOOL)initWithLicenseKey:(nonnull NSString *)licenseKey
                         error:(NSError *_Nullable *_Nullable)error;

    Swift

    class func initWithLicenseKey(_ licenseKey: String) throws

    Parameters

    licenseKey

    The license key

    error

    On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

    Return Value

    YES if the SDK was initialized successfully, NO if an error occured.