-1
我从testflight下载应用程序,然后尝试登录我得到的设备令牌为零。 请给我解决方案。当我从testflight下载应用程序时,设备令牌为零。
我从testflight下载应用程序,然后尝试登录我得到的设备令牌为零。 请给我解决方案。当我从testflight下载应用程序时,设备令牌为零。
您使用什么函数获取设备令牌?你可能犯了一个小错误。复制粘贴代码有助于。
在你的appDelegate,你应该有这样的事情,
// Called when APNs has assigned the device a unique token
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Convert token to string
let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
// Print it to console
print("APNs device token: \(deviceTokenString)")
}
你在IOS 10试试? – iOS
是的.. Xcode 8.2.1(8C1002) –
UserNotifications方法实现为ios 10通知? – iOS