用户以编程方式在iPhone中使用AppleId

zoh*_*han 5 ios apple-id

是否可以获取当前登录到设备的用户的Apple ID?实际上,我实现了inapp购买,并且在用户购买应用时获得了设备ID和用户的Apple ID。

l0g*_*g3r 6

不,这不可能。
您可以使用[[UIDevice currentDevice] identifierForVendor].


Kev*_*ado 2

不,你不能。它是一个类似于 UDID 的隐私元素。

您可以在这里阅读更多相关信息:隐私问题

但是,如果您愿意,您可以通过以下方法使用Apple提供的identifierForVendor :

[[UIDevice currentDevice] identifierForVendor]
Run Code Online (Sandbox Code Playgroud)