-
Notifications
You must be signed in to change notification settings - Fork 20
Config
Emarsys SDK now provides a solution for applicationCode
and merchantId
change in a convenient way, without restarting the SDK.
Note
When
changeApplicationCode
has been called, the SDK will log out the user and asetContactWithContactFieldValue
must be called again with the correctcontactFieldValue
.
-
Turn on Mobile Engage feature
There was no
applicationCode
set in the SDK before and withConfig
it can be set from nil to a valid code.
Note
In that case when the SDK was setup with nil
applicationCode
, the developer is responsible to callsetPushToken:
with the valid deviceToken if it was received during when the SDK was in inactive state
-
Turn off Mobile Engage feature
Erase a previously set
applicationCode
and disable the feature by setting it to nil. -
Use a different
applicationCode
Change a previously set
applicationCode
to a new one. If there was a pushToken set, the SDK saves it, callsclearPushToken
before executing theapplicationCode
change and restores the original pushToken for the newapplicationCode
. -
Use a different
contactFieldId
Change a previously set
contactFieldId
, to use a different contactField for authentication.
-
Turn on Predict feature
There was no
merchantId
set in the SDK before and withConfig
it can be set from nil to a validmerchantId
. -
Turn off Predict feature
Erase a previously set
merchantId
and disable the feature by setting it to nil. -
Use a different
merchantId
Change a previously set
merchantId
to a new one.
Note
If any error occurs during the change process, the completionBlock will be called with an error and the Mobile Engage feature will be turned off.
[Emarsys.config changeApplicationCode:<applicationCode: NSString>
completionBlock:^(NSError *error) {
if(error){
NSLog(error);
}
}];
Emarsys.config.changeApplicationCode(applicationCode: applicationCodeValue.text) { error in
if error != nil {
print("\(error)")
}
}
Errors can be handled in the completionBlock.
[Emarsys.config changeMerchantId:<merchantId: NSString>];
Emarsys.config.changeMerchantId(<merchantId: String>)
Provides what is the actual applicationCode
set in the SDK.
[Emarsys.config applicationCode];
Emarsys.config.applicationCode()
Provides what is the actual merchantId
set in the SDK.
[Emarsys.config merchantId];
Emarsys.config.merchantId()
Provides what is the actual contactFieldId
set in the SDK.
[Emarsys.config contactFieldId];
Emarsys.config.contactFieldId()
Deprecated
Please use clientId instead
Provides what is the actual clientId
used by the SDK. It is deprecated, please use the clientId instead.
[Emarsys.config hardwareId];
Emarsys.config.hardwareId()
Provides what is the actual clientId
used by the SDK.
[Emarsys.config clientId];
Emarsys.config.clientId()
Provides what is the actual language
of the application.
[Emarsys.config languageCode];
Emarsys.config.languageCode()
Provides what is the actual notificationSettings
set for the application.
[Emarsys.config pushSettings];
Emarsys.config.pushSettings()
Provides the actual sdkVersion
[Emarsys.config sdkVersion];
Emarsys.config.sdkVersion()