Requirements
- iOS 10.0+
- Swift 5+
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate iicontact into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'IIContactSDK', '~> 1.1'
Integration
Usage
You can add an IICView wherever you want to put the iicontact button. When users tap on it, it will expand automatically.
Notifications
Activate
- You have to send us your certificate
- To activate notification you have to send the device token to our SDK:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
IIContactSDK.shared.set(deviceToken, completionHandler: nil)
}
Handle
This framework can catch notifications sent from our servers. To do so you need to add this line in your AppDelegate.swift
:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// Handle notifications with IICEmbedded
IIContactSDK.shared.handleNotifications(userInfo: userInfo)
}