Developer Platform
  • Home
  • Getting Started
    • General Information
    • Features Overview
    • Security
  • APPs
    • Public Apps
      • Shopify
      • Salesforce
      • Zendesk
      • Google Analytics
    • Build your App
      • Getting started
      • My Apps
      • App information
      • App Parameters
      • App Plugins
      • Add Webhooks
      • Submit your Apps
      • App security
      • Developer Policy
  • Use Cases
    • Copilots
      • Product Catalog sync through API
      • FAQ sync through API
    • Visitor experience
      • Integrating custom buttons into your site
      • Check availability before escalating to iAdvize
      • Authenticated Messaging
        • Introduction
        • Web client-side implementation
          • Authenticated Messaging overview
          • Brief timeline of the integration process
          • How to enable authenticated mode in the administration portal?
          • How to implement the customer authentication backend (token provider)?
          • How to authenticate with iAdvize in client's website?
          • How to deal with activation success or failure?
          • How to logout?
          • Compatibility with Mobile SDK
          • FAQ
        • Web backend implementation
          • Important information and recommendations
          • Signature and Encryption Detailed Process
          • Technical backend implementation
          • FAQ
      • Cross-domain Conversation Continuity
      • Customize replies with Markdown
    • Agent workspace
      • Custom App example and step-by-step tutorial
        • Get Started
        • Work with the Desk
        • Intent / Trigger
        • JWT
        • References
    • Administration
      • Users
        • SAML SSO Authentication - Implementation Guide
        • Create, update and delete users via API
        • Manage the availability of your users with the iAdvize API
        • Integrate the iAdvize conversation panel into an existing tool
    • Data & Analytics
      • Anonymize a conversation or visitor data
      • Create a custom dashboard
      • Find contact data using GraphQL
      • Retrieve conversations data
      • Retrieve messages exchanged within a conversation
  • Technologies
    • GraphQL API
      • Terminology
      • Reference
      • Authentication
      • Schema lifecycle
      • Error Management
      • Pagination
    • REST API (deprecated)
      • Statistic (deprecated)
      • Group (deprecated)
      • Call meeting (deprecated)
      • Operator (deprecated)
      • Skill (deprecated)
      • Transaction (deprecated)
      • Visitor (deprecated)
    • Webhooks
      • Reference
      • Guides
    • Desk events
      • Reference
    • Web & Mobile SDK
      • Javascript Web SDK
        • Reference
      • Javascript Callbacks
        • Reference
        • Guides
      • Mobile SDK
        • Fourme (latest)
        • Epoisses
        • Dauphin
        • Cantal
        • 🀝Support Policy
        • πŸ€”Frequently Asked Questions
    • Custom App
    • External Bot
      • Implementation
        • Configuration flow
        • Conversation flow
        • Conversation objects
      • Configuration
      • FAQ
      • Best practices
Powered by GitBook
On this page
  • πŸ”† Forcing Light/Dark UI
  • πŸ“£ Updating targeting language
  • 🌍 Interface localization
  • 🀷 Missed opportunities
  • 🚦 Testing the SDK on Android
  • πŸ”€ Threading on iOS

Was this helpful?

  1. Technologies
  2. Web & Mobile SDK
  3. Mobile SDK

Frequently Asked Questions

PreviousSupport PolicyNextCustom App

Last updated 4 months ago

Was this helpful?

πŸ”† 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 inside the Application object will force the app, and thus the SDK Chatbox, to be displayed in the chosen mode:

class App : Application() {
  override fun onCreate() {
    super.onCreate()
    AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO)
  }
}

Using on the highest hierarchy view (Window) will force the app, and thus the SDK Chatbox, to be displayed in the chosen mode:

override func viewDidAppear(_ animated: Bool) {
  super.viewDidAppear(animated)
  view.window?.overrideUserInterfaceStyle = .light
}

You can also directly set the value inside your Info.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    ...
    <key>UIUserInterfaceStyle</key>
    <string>Light</string>
</dict>
</plist>

πŸ“£ 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:

IAdvizeSDK.targetingController.language = LanguageOption.Custom(Language.fr)
IAdvizeSDK.targetingController.registerUserNavigation(NavigationOption.KeepActiveRule)
IAdvizeSDK.shared.targetingController.language = .custom(value: .fr)
IAdvizeSDK.shared.targetingController.registerUserNavigation(navigationOption: .keepActiveRule)
IAdvizeSDK.setLanguage('fr');
IAdvizeSDK.registerUserNavigation(NavigationOption.keep, "", "");
IAdvizeSdk.setLanguage('fr');
IAdvizeSdk.registerUserNavigation(navigationOption: NavigationOption.optionKeep);

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.

The localization is automatic, providing the fact that your project already supports the language.

Check your project settings

1. Select your Xcode project in the Project Navigator (left pane).

2. Click on the Project or Target in the center pane.

3. Go to the Info tab.

4. Ensure that the language you want to support appears under Localizations.

Ensure there is at least one localization file

1. Create the file (if you don’t already have one) by choosing File β†’ New β†’ File… in the menu bar.

2. Select Strings File, name it Localizable.strings, and add it to your project.

3. In the File Inspector (right pane), under Localizations, check the languages that you want to include (e.g., English, French, German, etc.).

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:

ReflectionHelpers.setStaticField(android.os.Build::class.java, "MODEL", "whatever")
ReflectionHelpers.setStaticField(android.os.Build::class.java, "MANUFACTURER", "whatever")

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.

πŸ€”
setDefaultNightMode
overrideUserInterfaceStyle