且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

确定与登录iOS设备的Apple ID关联的国家/地区

更新时间:2022-06-26 07:52:48

答案两个问题都没有(有充分的理由)。 Apple不提供对设备所有者Apple ID的编程访问权限。当然也没有与信用卡相关的任何信息。我会询问用户获取其位置的权限并解释您的应用程序需要它的原因(在iOS 6中,您可以提供请求位置的原因的上下文)。

Answers to both questions is no (for good reasons). Apple does not provide programmatic access to the device owner's Apple ID. And certainly not any info associated to the credit card. I would go with asking the user permission to get their location and explaining why your app needs it (in iOS 6 you can provide a context for why location is requested).