KosignPushAsura
Example
To run the example project, clone the repo, and run pod install
from the Example directory first. (Now beta version test in internal company only). If run error try pod update
.
Requirements
- iOS 11.0+/ macOS 10.13+
- XCode 9.0+
- Swift 4.0+
Installation
KosignPushAsura is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KosignPushAsura'
In AppDelegate.swift has 3 steps to configure.
- Step 1:
import KosignPushAsura
- Step 2: replace superclass from (UIResponder, UIApplicationDelegate) to AsuraApplicationDelegate
class AppDelegate: AsuraApplicationDelegate {
...
}
- Step 3: Implement in didFinishLaunchingWithOptions.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.registerAsura(withAppId: "<input_app_id_here>")
return true
}
- Optional You can implement when receive notification or error handling below.
override func didReceiveAsuraNotifcation(userInfo: [String : AnyObject]) {
//do something here
}
override func didFailRegisterAsuraNotification(error: Error) {
//do something here
}
Author
Asura team (iOS)
License
KosignPushAsura is available under the MIT license. See the LICENSE file for more info.