简体   繁体   中英

Is there a way to get unique ID from ios device to use it for authorization into API? - React Native

I want to get some unique identifier to allow specific devices to accessing my API, but looking on internet there's no way to get it and it's against Apple Policy,

But I need to get one of unique ID (eg IMEI, UDID, ICCID, MEID, ETC)

looking on react-native-device-info , it just have getUniqueID() that can changed

This is IDFV on iOS so it will change if all apps from the current apps vendor have been previously uninstalled.

How can I get a unique ID ios devices?

FYI: My app won't be release into AppStore

There are major privacy concerns when getting a unique ID from a device. You have a few options.

First, you could just add some form of authentication or login system. This could be per device, per user, or even 1 login for the entire API. You could also limit the API to only respond to certain controlled IP addresses.

Second, you could add a flag and have a different version for production then in development. Limiting access that way.

Third, on first launch of your app you could request a new token from your server. The device would then store that token and the server would as well (to ensure no duplicates). Then just take that stored token and send it to the server for every request.

But on the device level there are privacy concerns in unique IDs for each device. You have to build your own system to handle it depending on your needs.

I would suggest that the IDFV was designed to suit your needs, while maintaining some level of privacy.

It is supposed to allow you (a vendor) to identify a return visit while not allowing you (a vendor) to share a user's identity with a third party in a relatable way for the third party to data-mine.

If users are routinely uninstalling and re-installing all of your apps I would look at solving the distribution issue you have there. I would assume (although haven't tested) that an update of an existing app would maintain the IDFV.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM