I am looking for a way to ban iOS and Android devices from using my application on their devices.
by using IMEI or UUID or how can do it.
Snapchat blocked users' devices on iOS and Android how do they do it what is the methods they chose for?
I am looking for a way to ban iOS and Android devices from using my application on their devices.
by using IMEI or UUID or how can do it.
Snapchat blocked users' devices on iOS and Android how do they do it what is the methods they chose for?
Now we can not get UUID or IMEI of Android/iOS device, because System doesn't allow us.
In iOS, you can save data (key-value) in Keychain, which is persisted until you reset to factory setting for restore. So you can mostly use it as device's identifier.
Here is a simple and useful lib that help you to write/read something to/from Keychain of an iOS device.
Example:
let deviceId = UUID().uuidString
let keychain = Keychain(service: "com.example.github-token") // you can put whatever but I recommend to use your app's bundleId
keychain["device_id"] = deviceId // save it.
// In you API request function
let keychain = Keychain(service: "com.example.github-token") // same above
let deviceId = keychain["device_id"]
// Then submit this deviceId to BE then you can verify that if this device is on the whitelist or blacklist.
// If it is on blacklist, just return error to client.