热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

getUniqueIdisnotuniqueissomecasesiniOS

Hello,SomeofourusersexperiencedanissuewiththeIDthatweretrievedvia

Hello,

Some of our users experienced an issue with the ID that we retrieved via

1
getUniqueId()

: they have the same ID across two different devices.

We found a way to reproduce the problem: if a user uses the same Apple ID across two devices and has used iCloud to restore a backup from one device to another,

1
getUniqueId

return the same string.

We are thinking about forking the library and removing the mechanism that saves and read from UserDefaults and Keychain. But before that, may I ask why this mechanism was implemented? Why not retrieve the ID always with the same mechanism using

1
[[UIDevice currentDevice].identifierForVendor UUIDString];

?

PS: thanks for the lib, used it on several projects!

该提问来源于开源项目:react-native-device-info/react-native-device-info


538 should have an implementation more like #60 and thus not run into this. If you forked and implemented something like #60 or proposed a PR that did that, it could get us going in that direction

That proposed implementation would not survive app uninstall/reinstalls but I think an app that wants to do that might be better served with firebase or similar?





   



推荐阅读
author-avatar
miya的发现王国sGA_998
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有