Chat360 is a Swift library that allows you to easily integrate a chatbot interface into your iOS applications using a WebView. This library simplifies the process of configuring and displaying the Chat360 chatbot.
- Easy integration of Chat360 chatbot in your iOS app.
- Configurable parameters for customization (bot ID, app ID, debug mode, etc.).
- Supports sending metadata to enhance chatbot functionality.
- Lightweight and easy to use.
To install the Chat360 library using Swift Package Manager, follow these steps:
-
Open your Xcode project.
-
Go to
File
>Swift Packages
>Add Package Dependency
. -
Enter the repository URL for Chat360:
https://github.com/sumanel/chat360-ios-sdk.git
-
Choose the version you want to install (usually the latest version) and click
Next
. -
Complete the installation.
Import the Chat360 library in your Swift file:
import Chat360Sdk
Create an instance of Chat360Config
with your bot and app IDs:
let chatConfig = Chat360Config(botId: "YOUR_BOT_ID", appId: "YOUR_APP_ID",)
You can present the Bot View using below code:
Chat360Bot.shared.setConfig(chat360Config: config)
try Chat360Bot.shared.startChatbot(animated: true)
- botId: The ID of your chatbot.
- appId: Your application ID.
- flutter: Set to
true
if you are using Flutter SDK. - meta: A dictionary for sending additional metadata as a JSON string.
If the URL creation fails, ensure that your botId
and appId
are correctly set. You can handle potential errors in your app as needed.