gpt4 book ai didi

iphone - 设备 token 是否与设备 ID 一样唯一?

转载 作者:IT王子 更新时间:2023-10-29 08:06:06 24 4
gpt4 key购买 nike

如果我们重置 iPhone,设备 ID 将保持不变。设备 token 是否相同?

最佳答案

我假设您指的是可用于以下方法的设备 token

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken

如果是这种情况,则不会,设备 token 可以并且将更改

引自苹果Local and Push Notification Programming Guide

By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device other than the one that the backup was created for (for example, the user migrates data to a new device), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or reinstalls the operating system, the device token changes. Moreover, never cache a device token and give that to your provider; always get the token from the system whenever you need it

我还可以在使用 Urban Airship 时验证此行为作为我的通知提供商,尽管到目前为止我只使用过一个测试设备,但我的帐户中注册了很多设备 token 。

关于iphone - 设备 token 是否与设备 ID 一样唯一?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6927011/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com