I am trying to fix Sim Swap issue in my app. I want a unique way to identify user's phone. So tried for following cases
Link1 Link2
I can use identifierForVendor but it also changes on every installation of the app.
The third option is to use DeviceCheck API to identify the device but it comes in only iOS 11.
Please let me know how to identify a users device & temporary disabled user's account in case of Sim Swap.
You will have to keep UUID into keychain since keychain data persist after uninstallation of the app
iOS manages keychain information as sensitive information. you can use SwiftKeychainWrapper library to easily access your keychain.
what apple doc says on SIM change: https://developer.apple.com/documentation/coretelephony/cttelephonynetworkinfo
CodingExample:
let uuid = UIDevice.current.identifierForVendor?.uuidString
KeychainWrapper.standard.set(uuid, forKey: "appUUID")
And whenever you want to get appUUID just fetch from keychain:
let uuid = KeychainWrapper.standard.string(forKey: "appUUID")
Note: You can also check if your UUID is changed after reinstallation of the app and update it into a keychain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With