復(fù)盤之前版本處理功能的時候,發(fā)現(xiàn)了一個有意思的東西。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.
簡單來說,你必須先在開發(fā)者賬號里面注冊AppID,形成開發(fā)賬號與應(yīng)用的綁定,然后使用蘋果提供的API,通過ES256加密、base64編碼的令牌,你可以存取2bit的信息,當(dāng)用戶刪除應(yīng)用后重新下載,這個值不變。

綜上,這個是蘋果新給出的能永久標(biāo)識信息的方式。但是存儲信息實(shí)在可憐??梢杂米鳂?biāo)識。