当我从 testflight.. 下载应用程序时,设备令牌为零?
Device token is nil, when I download the app from testflight..?
我从 testflight 下载应用程序然后我尝试登录我得到设备令牌 nil..
请给我解决方案。
您使用什么函数来获取设备令牌?你可能犯了一个小错误。 Copy-pasting 您的代码有帮助。
在你的 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("", {[=10=] + String(format: "%02X", )})
// Print it to console
print("APNs device token: \(deviceTokenString)")
}
我从 testflight 下载应用程序然后我尝试登录我得到设备令牌 nil.. 请给我解决方案。
您使用什么函数来获取设备令牌?你可能犯了一个小错误。 Copy-pasting 您的代码有帮助。
在你的 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("", {[=10=] + String(format: "%02X", )})
// Print it to console
print("APNs device token: \(deviceTokenString)")
}