iOS11-DeviceCheck

复盘之前版本处理功能的时候,发现了一个有意思的东西。iOS11+SDK支持的DeviceCheck,看苹果官方文档中有如下介绍:

Access per-device, per-developer data that your associated server can use in its business logic.

Using the DeviceCheck APIs, in combination with server-to-server APIs, you can set and query two bits of data per device, while maintaining user privacy.

Before you can use the DeviceCheck service in your app, you must register an explicit App ID with your team in the Apple Developer Portal.

The app you use to generate the token must be associated with your developer account; otherwise, the generation request fails.

简单来说,你必须先在开发者账号里面注册AppID,形成开发账号与应用的绑定,然后使用苹果提供的API,通过ES256加密、base64编码的令牌,你可以存取2bit的信息,当用户删除应用后重新下载,这个值不变。

返回的数据结构.png

综上,这个是苹果新给出的能永久标识信息的方式。但是存储信息实在可怜。可以用作标识。

你可能感兴趣的:(iOS11-DeviceCheck)