即使在卸载应用程序后仍存在持久性设备标识符 [英] Persistent device identifier even after app gets uninstalled
问题描述
在我的iPhone / iPad应用程序的使用案例中,有一个投票系统,一个设备可以向服务器发送一次投票。因此我的服务器需要识别用户的设备。我不希望用户注册帐户,因为这会使应用程序变得复杂。但是,我找不到有效的解决方案。
In my iPhone/iPad app's use case, there is a voting system and one device can send its vote once to the server. Therefore my server needs to identify user's device. I don't want the user to register an account because that makes the app complicate. However, I couldn't find a solution that works.
- 不推荐使用UDID
- 我认为获取MAC地址将使应用审核流程拒绝您的应用
- 我尝试使用
创建自己的UUID [[NSUUID UUID] UUIDString]
然后使用NSUserDefaults
存储它,但如果用户卸载应用程序,设置就会消失 -
identifierForVendor
也会在用户卸载应用时重置 - 我认为
advertisingIdentifier
但是因为我没有使用它对于广告,我认为它也会被应用审核流程拒绝
- UDID is deprecated
- I presume getting MAC address will get your app rejected by the app review process
- I tried creating my own UUID using
[[NSUUID UUID] UUIDString]
and then storing it usingNSUserDefaults
, but the settings disappear if the user uninstalls the app identifierForVendor
is also reset when the user uninstalls the app- I considered
advertisingIdentifier
but because I'm not using it for advertisement, I presume it will also be rejected by the app review process
我不是要求在任何情况下采用防弹解决方案。只是一个即使用户卸载应用程序也能解决的解决方案。因为我可以生成自己的UUID,我想我的问题归结为:如何保存应用程序卸载后仍然存在的应用程序的数据?
I'm not asking for a bulletproof solution in every situation. Just a solution that works even if the user uninstalls the app. Because I can generate my own UUID, I guess my question boils down to: How I can save data for the app that survives app uninstallation?
但是,如果你们中的任何人有其他方法,请随时通知我。谢谢。
However if any of you have other approach, please feel free to inform me. Thanks.
推荐答案
将UUID保存到钥匙串中。
Save the UUID into the keychain.
这篇关于即使在卸载应用程序后仍存在持久性设备标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!