gpt4 book ai didi

ios7 - UUIDString 的identifierForVendor 返回 null

转载 作者:行者123 更新时间:2023-12-02 20:50:48 26 4
gpt4 key购买 nike

我已经在我的 iPhone 应用程序中实现了推送通知,并且对于设备注册,我在应用程序中使用了以下代码。

[[[UIDevice currentDevice] identifierForVendor] UUIDString];

上面的代码在大多数设备上都能正常工作。然而,最近在一些装有 iOS 7.1 的 iPhone 5s 设备中,它返回 null,并且由于此应用程序崩溃。

最佳答案

引用documentation ;

If the value is nil, wait and get the value again later. This happens, for example, after the device has been restarted but before the user has unlocked the device.

例如,系统重新启动时启动的 VoIP 应用程序可能会发生这种情况,以允许该应用程序监听来电。

关于ios7 - UUIDString 的identifierForVendor 返回 null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22849932/

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