我有这个问题
Google Cloud Messaging
(
GCM
)在重构为Swift 3之后。有人能帮忙吗?
我得到了这个错误:
在这里:
func application( _ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data ) {
// ...
GGLInstanceID.sharedInstance().tokenWithAuthorizedEntity(gcmSenderID, scope: kGGLInstanceIDScopeGCM, options: registrationOptions, handler: registrationHandler)
}
此处的错误相同:
func onTokenRefresh() {
GGLInstanceID.sharedInstance().token(withAuthorizedEntity: gcmSenderID, scope: kGGLInstanceIDScopeGCM, options: registrationOptions, handler: registrationHandler)
}
func registrationHandler(_ registrationToken: String!, error: NSError!) {
// ...
}