PepperKit-iOS 允许开发者开发集成 PepperKit 功能的应用程序。
SDK 的主要目的是让使用 PepperKit 平台变得容易。它提供了两个客户端之间启动聊天的功能。以下提供更多信息,或查看 完整文档 了解 SDK 中所有可用的类。
通过 CocoaDocs 访问 PepperKit-iOS SDK 的推荐方法是。
本文件包含以下部分
SDK 在 iOS 7.0 或更高版本的设备上运行。
(手动)
Vendor
的子目录中,因此我们将该目录移动到其中。(Cocoapods)
将 PepperKit.embeddedframework
从您的项目目录拖放到您的 Xcode 项目中。
与上述类似,我们的项目有一个名为 Vendor
的组,因此我们将它放在那里。
选择 为任何添加的文件夹创建组
并为目标设置复选标记。然后点击 完成
。
在 项目导航器
中选择您的项目(⌘+1)。
选择您的应用程序目标。
选择选项卡 编译阶段
。
展开 与二进制文件链接的库
。
如果缺失,请添加以下系统框架:
Accelerate
AssetsLibrary
CoreData
CoreGraphics
CoreImage
CoreLocation
Foundation
ImageIO
MapKit
MessageUI
MobileCoreServices
QuartzCore
Security
SystemConfiguration
UIKit
如果缺失,请添加以下库:
icucore
打开你的 AppDelegate.m
文件。
在你的 #import 语句下方文件顶部添加以下行
#import <PepperKit/PepperKit.h>
搜索方法 application:didFinishLaunchingWithOptions:
添加以下行以设置 PepperKit
[PepperTalk sharedInstance].clientId = @"YOUR_CLIENT_ID";
[PepperTalk sharedInstance].clientSecret = @"YOUR_CLIENT_SECRET";
[[PepperTalk sharedInstance] enableInAppNotificationsInViewController:self.window.rootViewController]; //To enable in-app notifications
启用远程通知
application:didRegisterForRemoteNotificationsWithDeviceToken
[PepperTalk sharedInstance].deviceToken = deviceToken;
application:didReceiveRemoteNotification:
[[PepperTalk sharedInstance] handleRemoteNotification:userInfo presentingViewController:self.window.rootViewController];