ApptentiveKit 6.8.1

ApptentiveKit 6.8.1

Frank SchmittLuqmaan维护。



  • Apptentive SDK团队

ApptentiveKit

ApptentiveKit 允许您将您的iPhone和iPad应用程序与Apptentive的客户通讯平台集成。

使用Apptentive功能可以提高您的应用程序在App Store的评分,收集并回应客户反馈,在您的应用程序的特定位置显示调查,以及更多。

添加ApptentiveKit依赖

我们建议使用Swift包管理器将ApptentiveKit包含到您的项目中。

在Xcode中,选择文件 > 添加包… 并添加此存储库的URL。

在您的应用程序中使用ApptentiveKit

要使用Swift文件中的Apptentive功能,您将不得不导入ApptentiveKit模块

import ApptentiveKit

在您的应用程序的生命周期早期,请调用共享Apptentive实例上的register(with:completion:)方法

Apptentive.shared.register(with: .init(key: "<#Your Apptentive App Key#>", signature: "<#Your Apptentive App Signature#>"))

在您的应用中各个位置,使用 engage(event:from:completion:) 方法记录与 ApptentiveKit 相关的事件。当事件被激活时,SDK 可以配置显示交互,例如笔记、调查或爱对话框,并且您可以根据客户设备上激活的事件定义段。

@IBAction func completePurchase(sender: UIButton) {
    // ...
    
    Apptentive.shared.engage("purchase_complete", from: self) // where `self` is a UIViewController instance.
}

如果您打算使用消息中心,那么应在您的应用中有一个按钮,让客户可以打开消息中心。

@IBAction func openMessageCenter(sender: UIButton) {
    // ...
    
    Apptentive.shared.presentMessageCenter(from: self) // where `self` is a UIViewController instance.
}

进一步阅读

请访问我们的 客户学习中心 获取更全面的集成和迁移指南,以及对产品所有者和其他平台开发者的指南。

贡献

我们的客户端代码是完全开源的,我们欢迎对 Apptentive SDK 的贡献!如果您有改进或错误修复,请首先阅读我们的 贡献协议

问题报告

如果您在使用 Apptentive SDK 时遇到问题,请 打开 GitHub 问题

如果请求紧急,请联系 [email protected]