Live Chat SDK Swift
Configuration
To use this SDK connector, you must meet the following requirements:
XCode 10.0+ (recommended to use XCode 12.1+)
Swift 4.0, 4.1, 4.2, 5.0
Installation
Steps to install using this framework:
Obtain file
imi_dolphin_livechat_ios_xcframework
Open your Xcode project and navigate to Project Settings > General
Under Framework, Libraries, and Embedded Content, click button '+' and select Add Other... > Add Files..
Locate and add
imi_dolphin_livechat_ios_xcframework
to your projectEnsure that Embed & Sign is selected to properly bundle the framework with your app
Repeat the same steps to add any dependencies like
StompClientLib
danCryptoSwift.xcframework
if needed
Import Library
Add the following import statement at the top of your Swift file:
Initialize User Profile
Create a user profile using the classDolphinProfile
:
Component Explanation:
DolphinProfile
Represents the identify of the user initiating the chat
name
Represents the name of the user
Represents the user's email
phoneNumber
Represents the user's phone number
uid
Used to determine whether this user session will create a new ticket or not
Initialize Connection Variables
Define the required notification listeners and connection variables:
Setup Connection in viewDidLoad
Implement Notification Handlers
Sending Messages
Send Text Message
Send Image
Ensure image file meets these conditions:
Image size must be under 2MB
Using format PNG or JPEG
Send Video
Ensure video file meets these conditions:
Video size must be under 2MB
Using format MP4
Send File (Document and Audio as File)
Ensure documents file meets these conditions:
Document/Audio size must be under 2MB
Memiliki format PDF
Last updated
Was this helpful?