Apple ID 可从 Cocoa Touch 内的应用程序下载中检索

发布于 2024-10-13 18:13:13 字数 217 浏览 6 评论 0原文

你好 我正在开发一个 iPhone 应用程序,每次下载都需要维护一个唯一的标识符。有没有办法检索用于下载应用程序的 Apple ID 或其他标识符,我可以使用该标识符将所有设备与该下载链接到远程数据库/服务?

基本上我想要一个自定义生成的数据实例位于链接到某个 Apple ID 的任何设备上。如果 iTunes 对您下载的任何应用程序进行签名,则也可以选择使用该校验和。

有什么想法吗?

Hi
I'm working on an iphone app that needs to be maintain a somewhat unique identifier per download. Is there a way to retrieve either the Apple ID used to download the App or another identifier I can use to link all devices with that download to a remote database/service?

Basically I want a single instance of my custom-generated data sitting on whatever device is linked to a certain Apple ID. If iTunes signs any App that you download, using that checksum would also be an option.

Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

把人绕傻吧 2024-10-20 18:13:13

如果您使用 IAP(应用程序内购买),您可以将用户的购买与单个收据联系起来,并根据 Apple 的服务器验证该收据。

对于 App 商店购买,与 IAP 不同,Apple 允许并且几乎强制开发者允许他们的 App 商店应用程序在客户可以放置 iTunes 帐户的尽可能多的设备上以相同的方式运行,并且应用程序没有任何可用信息这是客户第一次安装还是第 N 次安装。如果该商业模式不适合您,请不要将应用程序放在应用程序商店中出售。

If you use IAP(In App Purchase), you can tie a users purchase to a single receipt, and verify that receipt against Apple's servers.

For App store purchases, as opposed to IAP, Apple allows, and pretty much forces a developer to allow their App store apps to run identically on as many devices as a customer can put their iTunes account on, with no information available to the app about whether this was the customer's first install or their Nth. If that business model doesn't work for you, don't put the app for sale in the App store.

星星的轨迹 2024-10-20 18:13:13

据我所知,绝对没有办法访问设备上当前登录的Apple ID。您唯一真正的选择是维护自己的用户名/登录组合,用户必须在他们拥有的每台设备上输入该组合。

As far as I am aware, there is absolutely no way to get access to the current signed-in Apple ID on the device. Your only real option is to maintain your own username/login combo that the user has to enter on each device they own.

无悔心 2024-10-20 18:13:13

我不相信您可以获得 Apple ID,但是您可以通过 UIDevice uniqueIdentifier 方法。

例如:

UIDevice *ourDevice = [UIDevice currentDevice];
NSString *uniqueIdentifier = [ourDevice uniqueIdentifier];

但是,您应该注意上面链接文档中的以下内容(强调我的):

设备的唯一标识符
(有时缩写为 UDID
唯一设备标识符)是一个哈希值
由各种硬件组成的价值
标识符,例如设备序列号
数字。保证是唯一的
对于每个设备。 UDID 是
与设备名称无关。为了
使用 SIM 卡的设备(用户
身份模块)卡,UDID是
独立于SIM卡。

为了用户安全和隐私,您
不得公开关联设备的
用户帐户的唯一标识符。

您可以结合使用 UDID
具有特定于应用程序的用户 ID,
用于识别特定于应用程序的
您服务器上的数据。

I don't believe you can get the Apple ID, but you can however get the current device's ID via the UIDevice uniqueIdentifier method.

For example:

UIDevice *ourDevice = [UIDevice currentDevice];
NSString *uniqueIdentifier = [ourDevice uniqueIdentifier];

However, you should note the following (emphasis mine) from the above linked document:

A device’s unique identifier
(sometimes abbreviated as UDID for
Unique Device Identifier) is a hash
value composed from various hardware
identifiers such as the device serial
number. It is guaranteed to be unique
for each device. The UDID is
independent of the device name. For
devices that use a SIM (subscriber
identity module) card, the UDID is
independent of the SIM card.

For user security and privacy, you
must not publicly associate a device’s
unique identifier with a user account.

You may use the UDID, in conjunction
with an application-specific user ID,
for identifying application-specific
data on your server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文