Add iOS SDK to your app
Add the SDK
Using Cocoapods
- In a text editor, open Podfile.
- Add pod 'CommentSystem'
target 'CommentSystem' do
# Use one of those options
use_frameworks!
# use_frameworks! :linkage => :static
# Pods for CommentSystem
pod 'CommentSystem'
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 Comment System SDK
- In Xcode, open AppDelegate.swift
- Import the CommentSystem iOS SDK: import CommentSystem
- Initialize the SDK in application(application:didFinishLaunchingWithOptions). Make sure to replace SITE_ID, URL , NAME, PAGE_TITLE, THREAD_ID and THREAD_PROFILE_ID with the values corresponding to your domain.
import CommentSystem
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?) -> Bool {
ArenaCommentSystem(
ContextFactory(),
SITE_ID,
URL,
NAME,
PAGE_TITLE,
THREAD_ID,
THREAD_PROFILE_ID,
Environment.DEVELOPMENT
)
return true
}Updated 12 days ago