The Netomi Mobile Chat SDK makes it easy to embed conversational AI into your iOS application. It supports:
- Rich media responses
- Forms and file attachments
- Live agent handoff
- Customizable look and feel
This sample app demonstrates the core integration steps and includes code examples for customizing various aspects of the chat UI.
- iOS 15 or later
- Xcode 13 or later
- UIKit or SwiftUI (both supported by the SDK)
- CocoaPods or Swift Package Manager installed/configured
- Bot Credentials (i.e., botRefId and environment
env
) from Netomi
- Navigate to the project folder containing the
Podfile
. - Add the SDK in the
Podfile
:
pod 'NetomiChatSDK', '1.0.0'
- Install:
pod install
- Open the generated
.xcworkspace
file in Xcode.
- Open your Xcode project and go to
Project > Package Dependencies
. - Add a new package using:
https://github.com/msgai/netomi-chat-ios.git
https://github.com/aws-amplify/aws-sdk-ios-spm.git with AWSCore & AWSIoT packages.
- Select the main branch or a version tag, then finish adding.
- Build your project to ensure the dependency is resolved.
- In Xcode, select a simulator or connected device running iOS 15+.
- Build (
⌘+B
) and Run (⌘+R
). - The sample app's main screen will display a button or entry to Launch Chat.
In the sample’s AppDelegate
or SceneDelegate
(or wherever you want to initialize the SDK):
NetomiChat.shared.initialize(botRefId: "YOUR_BOT_REF_ID", environment: .USProd)
botRefId
: The unique identifier for your AI Agent.environment
: Use.USProd
,.SGProd
,.EUProd
,.QA
,.QAInternal
, or.Development
as provided by Netomi.
In a view controller or SwiftUI view:
NetomiChat.shared.launch(jwt: nil) { errorData in
// Handle any errors, e.g., present an alert
}
jwt
(optional): Include if you have an authenticated user token.- The optional error callback handles initialization or network errors.
You can pass additional user-specific data (e.g., department, user IDs):
NetomiChat.shared.sendCustomParameter(name: "department", value: "marketing")
This helps personalize conversations on the AI Agent side.
In ViewController
or wherever you configure the chat:
// Customizing the chat header
var header = NCWHeaderConfiguration()
header.backgroundColor = .green
header.isGradientApplied = false
NetomiChat.shared.updateHeaderConfiguration(config: header)
// Customizing the chat footer
var footer = NCWFooterConfiguration()
footer.backgroundColor = .green
footer.isFooterHidden = false
NetomiChat.shared.updateFooterConfiguration(config: footer)
You can modify colors, gradients, branding text, icons, and more.
If your sample demonstrates using Firebase Cloud Messaging:
NetomiChat.shared.setFCMToken("YOUR_FCM_TOKEN_HERE")
Ensure Firebase is properly set up in this sample project for push notifications.
© 2025 Netomi. All rights reserved. This sample app is for demonstration purposes only. The Netomi Mobile Chat SDK may include its own license terms. Review the LICENSE file in this repository (if available) and refer to official Netomi documentation for detailed legal information.
For questions, issues, or feature requests regarding this sample or the Netomi Mobile Chat SDK:
- Visit Netomi.com for official support.
- Contact your Netomi representative directly.
Happy coding!