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.0Declaration
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.0Declaration
Objective-C
+ (id<SecureLog>)configureSecureLog:(SecureLogConfig *)config;Swift
class func configureSecureLog(_ config: SecureLogConfig!) -> (any SecureLog)!Parameters
configconsist 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.0Declaration
Objective-C
+ (instancetype)configureWithConfigurations:(NSSet *)configurations;Swift
class func configure(withConfigurations configurations: Set<AnyHashable>!) -> Self!Parameters
configurationsThe 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.4Declaration
Objective-C
+ (instancetype)configureWithConfigurations:(NSSet *)configurations useDeviceSourceBinding:(BOOL)useDeviceSourceBinding;Swift
class func configure(withConfigurations configurations: Set<AnyHashable>!, useDeviceSourceBinding: Bool) -> Self!Parameters
configurationsThe set of module configurations.
useDeviceSourceBindingdevice 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.7Declaration
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
configurationsThe set of module configurations.
useDeviceSourceBindingdevice 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.
groupIdentifierThe 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.0Declaration
Objective-C
+ (instancetype)configureWithActivationCode:(NSData *)activationCode configurations:(NSSet *)configurations;Swift
class func configure(withActivationCode activationCode: Data!, configurations: Set<AnyHashable>!) -> Self!Parameters
activationCodeThe activation code.
configurationsThe 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.4Declaration
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
activationCodeThe activation code.
configurationsThe set of EMModuleConfiguration module configurations.
useDeviceSourceBindingdevice 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.7Declaration
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
activationCodeThe activation code.
configurationsThe set of EMModuleConfiguration module configurations.
useDeviceSourceBindingdevice 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.
groupIdentifierThe 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.0Declaration
Objective-C
+ (BOOL)isConfigured;Swift
class func isConfigured() -> BoolReturn Value
YES if configured, NO otherwise.
-
Tells if device source binding is enabled or not
Since
4.4Declaration
Objective-C
+ (BOOL)isDeviceSourceBindingEnabled;Swift
class func isDeviceSourceBindingEnabled() -> BoolReturn Value
YES if enabled, NO otherwise.
-
The version of the core.
Since
4.0Declaration
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.0Declaration
Objective-C
- (id<EMPasswordManager>)passwordManager;Swift
func passwordManager() -> (any EMPasswordManager)!Return Value
The password manager.
-
Get factory object for creating SecureContainer objects.
Since
4.0Declaration
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
configurationslist 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:
- App Bundle Version Update
- Ezio SDK Upgrade
- Change in Keychain Access Group
- Change in Device Binding Parameter
Since
4.7
Declaration
Objective-C
- (BOOL)hasPendingMigration;Swift
func hasPendingMigration() -> BoolReturn Value
YES if there are pending items to migrate, NO otherwise
-
Performs the migration
Warning
Performed asynchronouslyNote: 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 -> BoolParameters
messageThe prompt message for TouchID/FaceID
completionThe 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.\nEMResetModuleOTP: Resets the OTP module. This will invalidate all existing tokens and delete the corresponding keychain data.\nEMResetModuleOOB: Resets the OOB modulle. Re-registration is required.\nEMResetModuleAll: 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.\nWarning
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
resetModuleThe respective module to reset.
EMCore Class Reference