我已经下载了ParseStarterProject版本1.14.3,下载后它要求我转换为swift 3.之后给我一个错误:
Cannot convert value of type '(Bool, NSError?) -> ()' to expected argument type 'PFBooleanResultBlock?'
代码:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let installation = PFInstallation.current()
installation?.setDeviceTokenFrom(deviceToken)
installation?.saveInBackground()
PFPush.subscribeToChannel(inBackground: "") { (succeeded: Bool, error: NSError?) in
if succeeded {
print("ParseStarterProject successfully subscribed to push notifications on the broadcast channel.\n")
} else {
print("ParseStarterProject failed to subscribe to push notifications on the broadcast channel with error = %@.\n", error)
}
} as! PFBooleanResultBlock as! PFBooleanResultBlock as! PFBooleanResultBlock as! PFBooleanResultBlock as! PFBooleanResultBlock as! PFBooleanResultBlock as! PFBooleanResultBlock
}
解决
但是给了我这个错误:
"Expected ) in the expression list"