EMCore

Objective-C


@interface EMCore : NSObject

Swift

class EMCore : NSObject

EMCore is the entry-point of the SDK Core. EMCore takes the configurations needed for different modules and provides shared SDK functionalities.

Since

4.0
  • Singleton instance of EMCore

    Since

    4.0

    Declaration

    Objective-C

    + (instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self!

    Return Value

    The singleton EMCore instance. This method requires Core to be configured before.

  • Configure the secure log. Pass config = nil if you want to disable the logging. This functions should be called before configuring the EZIOMobile SDK and can only be called once.

    Since

    6.0

    Declaration

    Objective-C

    + (id<SecureLog>)configureSecureLog:(SecureLogConfig *)config;

    Swift

    class func configureSecureLog(_ config: SecureLogConfig!) -> (any SecureLog)!

    Parameters

    config

    consist of public key and setting of SecureLog

    Return Value

    id the instance of SecureLog - use to interact with SecureLog feature. Throw NSGenericException if the function is called more than once.

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.0

    Declaration

    Objective-C

    + (instancetype)configureWithConfigurations:(NSSet *)configurations;

    Swift

    class func configure(withConfigurations configurations: Set<AnyHashable>!) -> Self!

    Parameters

    configurations

    The set of module configurations.

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.4

    Declaration

    Objective-C

    + (instancetype)configureWithConfigurations:(NSSet *)configurations
                         useDeviceSourceBinding:(BOOL)useDeviceSourceBinding;

    Swift

    class func configure(withConfigurations configurations: Set<AnyHashable>!, useDeviceSourceBinding: Bool) -> Self!

    Parameters

    configurations

    The set of module configurations.

    useDeviceSourceBinding

    device binding to enable or disable DEVICE fingerprint source. Enabling this flag is equivalent to including ‘DEVICE’ in the Device Fingerprint Source configuration in 2.X.

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.7

    Declaration

    Objective-C

    + (instancetype)configureWithConfigurations:(NSSet *)configurations
                         useDeviceSourceBinding:(BOOL)useDeviceSourceBinding
                                groupIdentifier:(NSString *)groupIdentifier;

    Swift

    class func configure(withConfigurations configurations: Set<AnyHashable>!, useDeviceSourceBinding: Bool, groupIdentifier: String!) -> Self!

    Parameters

    configurations

    The set of module configurations.

    useDeviceSourceBinding

    device binding to enable or disable DEVICE fingerprint source. Enabling this flag is equivalent to including ‘DEVICE’ in the Device Fingerprint Source configuration in 2.X.

    groupIdentifier

    The app group id, to allow group access to the files.

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.0

    Declaration

    Objective-C

    + (instancetype)configureWithActivationCode:(NSData *)activationCode
                                 configurations:(NSSet *)configurations;

    Swift

    class func configure(withActivationCode activationCode: Data!, configurations: Set<AnyHashable>!) -> Self!

    Parameters

    activationCode

    The activation code.

    configurations

    The set of EMModuleConfiguration module configurations. @exception NSException if core is already configured

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.4

    Declaration

    Objective-C

    + (instancetype)configureWithActivationCode:(NSData *)activationCode
                                 configurations:(NSSet *)configurations
                         useDeviceSourceBinding:(BOOL)useDeviceSourceBinding;

    Swift

    class func configure(withActivationCode activationCode: Data!, configurations: Set<AnyHashable>!, useDeviceSourceBinding: Bool) -> Self!

    Parameters

    activationCode

    The activation code.

    configurations

    The set of EMModuleConfiguration module configurations.

    useDeviceSourceBinding

    device binding to enable or disable DEVICE fingerprint source. Enabling this flag is equivalent to including ‘DEVICE’ in the Device Fingerprint Source configuration in 2.X. @exception NSException if core is already configured

  • Configures the core with module configurations. It is the entry point of the SDK. All other features should not be used without invoking this method. Configuration can only be called once.

    Since

    4.7

    Declaration

    Objective-C

    + (instancetype)configureWithActivationCode:(NSData *)activationCode
                                 configurations:(NSSet *)configurations
                         useDeviceSourceBinding:(BOOL)useDeviceSourceBinding
                                groupIdentifier:(NSString *)groupIdentifier;

    Swift

    class func configure(withActivationCode activationCode: Data!, configurations: Set<AnyHashable>!, useDeviceSourceBinding: Bool, groupIdentifier: String!) -> Self!

    Parameters

    activationCode

    The activation code.

    configurations

    The set of EMModuleConfiguration module configurations.

    useDeviceSourceBinding

    device binding to enable or disable DEVICE fingerprint source. Enabling this flag is equivalent to including ‘DEVICE’ in the Device Fingerprint Source configuration in 2.X.

    groupIdentifier

    The app group id, to allow group access to the files. @exception NSException if core is already configured

  • Tells if the core has been configured or not

    Since

    4.0

    Declaration

    Objective-C

    + (BOOL)isConfigured;

    Swift

    class func isConfigured() -> Bool

    Return Value

    YES if configured, NO otherwise.

  • Tells if device source binding is enabled or not

    Since

    4.4

    Declaration

    Objective-C

    + (BOOL)isDeviceSourceBindingEnabled;

    Swift

    class func isDeviceSourceBindingEnabled() -> Bool

    Return Value

    YES if enabled, NO otherwise.

  • The version of the core.

    Since

    4.0

    Declaration

    Objective-C

    + (NSString *)version;

    Swift

    class func version() -> String!

    Return Value

    Version of the core.

  • Get passwordManager EMPasswordManager. which is used to unlock secrets used by different modules.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPasswordManager>)passwordManager;

    Swift

    func passwordManager() -> (any EMPasswordManager)!

    Return Value

    The password manager.

  • Get factory object for creating SecureContainer objects.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMSecureContainerFactory>)secureContainerFactory;

    Swift

    func secureContainerFactory() -> (any EMSecureContainerFactory)!

    Return Value

    Secure container factory.

  • Update Configuration. This will replace existing one (if any) and add new one (if it does not exist previously). However, it will not delete existing one if configs parameter does not contains some of existing one

    Since

    5.3.0

    Declaration

    Objective-C

    + (void)updateConfigurations:(NSSet *)configurations;

    Swift

    class func updateConfigurations(_ configurations: Set<AnyHashable>!)

    Parameters

    configurations

    list of configuration parameters. It does not need to contains all existing configurations

  • Whether the SDK has pending migration This is TRUE any of the following conditions are met:

    1. App Bundle Version Update
    2. Ezio SDK Upgrade
    3. Change in Keychain Access Group
    4. Change in Device Binding Parameter

    Since

    4.7

    Declaration

    Objective-C

    - (BOOL)hasPendingMigration;

    Swift

    func hasPendingMigration() -> Bool

    Return Value

    YES if there are pending items to migrate, NO otherwise

  • Performs the migration

    Warning

    Performed asynchronously

    Note: During migration, if TouchID/FaceID has been used before, TouchID/FaceID alert is prompted for authentication. It is recommended that before calling this API, you have already notified the end user that authentication is about to be done to continue with the migration.

    Since

    4.7

    Declaration

    Objective-C

    - (void)performMigrationWithAlertMessage:(NSString *)message
                                  completion:(void (^)(BOOL, NSError *))completion;

    Swift

    func performMigration(withAlertMessage message: String!) async throws -> Bool

    Parameters

    message

    The prompt message for TouchID/FaceID

    completion

    The migration completion handler. Returns the status of migration and error if any.

  • Resets the selected module of this SDK.

    @discussion Refer below for the respective levels of invalidation.\n EMResetModuleConfig: This will reset ONLY the static configuration of the Core instance. It can then be re-configured with different settings.\n EMResetModuleOTP: Resets the OTP module. This will invalidate all existing tokens and delete the corresponding keychain data.\n EMResetModuleOOB: Resets the OOB modulle. Re-registration is required.\n EMResetModuleAll: Resets the entire SDK. This would revert the SDK into a factory state. Device fingerprint data will be deleted. All modules, password, SecureStorage, will need to be recreated.\n

    Warning

    This operation should be used cautiously. Calling this method will invalidate the selected module entirely.

    Since

    6.6.0

    Declaration

    Objective-C

    - (void)resetSDK:(EMResetModule)resetModule;

    Swift

    func resetSDK(_ resetModule: EMResetModule)

    Parameters

    resetModule

    The respective module to reset.