Add iOS SDK to your app
Add the SDK
Using Cocoapods
- In a text editor, open Podfile.
- Add pod 'ArenaChat'
target 'ArenaChat' do
# Use one of those options
use_frameworks!
# use_frameworks! :linkage => :static
# Pods for ArenaChat
pod 'ArenaChat'
end- In terminal go to your project directory then execute pod install --repo-update to install the dependencies added to Podfile.
- Open the .xcworkspace file for your project to launch Xcode.
Initialize Sdk the Arena Chat SDK
- In Xcode, open AppDelegate.swift
- Import the ArenaChat iOS SDK: import ArenaChat
- Initialize the SDK in application(application:didFinishLaunchingWithOptions). Make sure to replace SITE_ID, ROOM_ID with the values corresponding to your domain.
import ArenaChat
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?) -> Bool {
ArenaChat(
ContextFactory(),
SITE_ID,
ROOM_ID,
Environment.DEVELOPMENT
)
return true
}Updated about 8 hours ago