Use the UI SDK for iOS
The UI SDK allows you to add Messaging for In-App into your iOS app with a ready-to-go user experience. Just add the
Interface view to your app. You can customize the colors and strings so that the Messaging user interface looks natural in your app.
Import the frameworks from wherever you’re using the SDK.
UIConfiguration instance. To create a configuration instance, you can point to the config file you previously downloaded from your org, or you can manually add the values from within this config file.
OPTION 1: Configure Using the Config File
To learn how to download the config file from your org, see Configure a Messaging for In-App Deployment in Salesforce Help.
OPTION 2: Configure Manually with Config Info
If you're using SwiftUI, add the
Interface view to your view, using the
UIConfiguration instance to initialize and display the chat feed.
If you're using Swift or Objective-C, add the
InterfaceViewController view controller to your app, using the
UIConfiguration instance to initialize the view controller.
To take advantage of a pre-chat form or an Einstein Bot, your mobile app code doesn’t require changes. To use pre-chat, make sure that you configured pre-chat in your Embedded Service Deployment within your org. To use a bot, design your bot in your org, and then route the user to the bot with your Omni-Channel flow. To get help, visit our Messaging for In-App and Web learning map.
This step is only required if you want to implement push notifications.
Before you add code in your app for notifications, set up Apple Push Notifications as described in the Apple documentation. Then follow Salesforce org setup instructions at Set Push Notifications for Messaging for In-App.
In your mobile app, make a few additional calls into the SDK during registration and when handling the message. To learn more, see Set Up Messaging Notifications for iOS.
This step is optional.
The UI SDK automatically brands the app with a default color scheme. You can customize this color scheme in your app by creating color sets in your Assets catalog using the SDK's token names.
To learn more, see Customize Colors for iOS.
This step is optional.
The UI SDK provides default text for all the messages that a user can encounter. You can customize any UI text by creating a localizable resource file in your app and overriding the strings.
To learn more, see Customize Strings for iOS.