Frequently Asked Questions
🔆 Forcing Light/Dark UI
By default the iAdvize Mobile SDK displays its UI following the user settings choice on light/dark mode. It is however possible to force the light/dark mode to a given value.
Using setDefaultNightMode inside the Application
object will force the app, and thus the SDK Chatbox, to be displayed in the chosen mode:
📣 Updating targeting language
The iAdvize Mobile SDK has a navigation process that is language dependent. That means that when the targeting language is updated inside the client application (for instance in apps offering multiple languages support) the user navigation must be updated in order for the engagement process to be functional again. This can be easily done by calling registerUserNavigation
right after updating the targeting language:
This only concerns the targeting language. For information about the SDK localization, check 🌍 Interface localization.
🌍 Interface localization
The iAdvize Mobile SDK supports the localization of its interface in 8 languages:
English
Dutch
French
German
Italian
Lithuanian
Portuguese
Spanish
The localization is automatic but you may need to check that your project meets the requirements, depending on the platform.
The localization is automatic, there are no further steps required.
If your app runs in a language that does not belong to the supported languages, the iAdvize SDK will be localized in English.
This only concerns the interface language. For information about the targeting language, check 📣 Updating targeting language.
🤷 Missed opportunities
The iAdvize Mobile SDK inherits from some behavior of the Web Platform in order to benefit from all the Web Platform features like Monitoring & Statistics.
The Missed Opportunities behavior is one of them. When the website triggers a targeting rule for a visitor, for the first time, but there is no agent available to answer, the engagement process is terminated as a Missed opportunity, and the visitor cannot be engaged on the same page again, even when re-triggering the targeting rule when there are agents available to answer.
The Mobile SDK uses the same approach, but as mobile users have a different navigation process a registerUserNavigation
method was added to fix those kinds of navigation discrepancies.
Indeed this method acts in a similar way to activateTargetingRule
but it adds upon it the update of the user navigation, thus allowing a new engagement.
More information on the use of this method can be found on the dedicated section.
🚦 Testing the SDK on Android
If you are running unit tests that implies the SDK, some additional steps may be needed.
The Android SDK uses two device system constants that are not instantiated inside the unit test flow, you will have to register them inside your unit tests initiation:
Please also be sure to initialize the SDK during the unit tests setup (see the Setting up the SDK section).
🔀 Threading on iOS
The iAdvize iOS SDK offers several callbacks through delegate methods and completion handlers.
In most cases, these callbacks are used to perform UI-related tasks. To ensure thread safety, the majority of the SDK's delegates and completion handlers are annotated with the @MainActor
keyword. This guarantees that the callbacks are always executed on the main thread.
An important exception is the JWEProvider
protocol and its willRequestJWE(completion:)
method. Neither the protocol nor the method's completion handler are annotated with @MainActor
. This design choice allows your JWEProvider
implementation to operate independently of the main thread. You are free to invoke the completion handler from any thread, based on your implementation's requirements.
More broadly, the iAdvize SDK is fully compatible with apps using Swift Concurrency and Swift 6 Language Mode. It is important not to use @preconcurrency
when importing the iAdvize SDK, as it is designed to integrate seamlessly without additional annotations.
Last updated
Was this helpful?