KosignPushAsura 0.1.5

KosignPushAsura 0.1.5

Vansa Pha维护。



  • Vansa Pha

KosignPushAsura

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install。(目前仅在内部公司进行测试版测试)。如果运行出错,请尝试 pod update

要求

  • iOS 11.0+ / macOS 10.13+
  • XCode 9.0+
  • Swift 4.0+

安装

KosignPushAsura 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中

pod 'KosignPushAsura'

在 AppDelegate.swift 中有 3 步配置。

  • 步骤 1
import KosignPushAsura
  • 步骤 2:将 super 类从 (UIResponder, UIApplicationDelegate) 替换为 AsuraApplicationDelegate
class AppDelegate: AsuraApplicationDelegate {
    ...
}
  • 步骤 3:在 didFinishLaunchingWithOptions 中实现。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    self.registerAsura(withAppId: "<input_app_id_here>")

    return true
}
  • 可选:您可以在收到通知或错误处理时实现以下内容。
override func didReceiveAsuraNotifcation(userInfo: [String : AnyObject]) {
//do something here
}

override func didFailRegisterAsuraNotification(error: Error) {
//do something here
}

作者

Asura 团队(iOS)

许可协议

KosignPushAsura 在 MIT 许可协议下提供。有关更多信息,请参阅 LICENSE 文件。