Hi All,

I'm storing the device unique ID of a mobile device for security purpose, I was using the UUID from the common plugin. Since it is specific to app installation the UUID is coming as different value if we uninstall and reinstall the same application  for IOS alone. For Android it is not the case, can anyone suggest me a way to get unique ID of device in IOS.


Thanks in advance,.

Regards,

Arun Kumar

Arunkumar T B wrote:

Hi All,

I'm storing the device unique ID of a mobile device for security purpose, I was using the UUID from the common plugin. Since it is specific to app installation the UUID is coming as different value if we uninstall and reinstall the same application  for IOS alone. For Android it is not the case, can anyone suggest me a way to get unique ID of device in IOS.


Thanks in advance,.

Regards,

Arun Kumar

Maybe this component can help you out.


Get Device Information

 https://is.gd/LbDnqf

 

CM_Techy wrote:

Arunkumar T B wrote:

Hi All,

I'm storing the device unique ID of a mobile device for security purpose, I was using the UUID from the common plugin. Since it is specific to app installation the UUID is coming as different value if we uninstall and reinstall the same application  for IOS alone. For Android it is not the case, can anyone suggest me a way to get unique ID of device in IOS.


Thanks in advance,.

Regards,

Arun Kumar

Maybe this component can help you out.


Get Device Information

 https://is.gd/LbDnqf

 

 Hi CM_Techy,

Thanks for your response,

The plugin that you have mentioned provides the UUID of the device which will be changing when we reinstall the application. I need a solution so  that even reinstalling the application the UUID of  the device should not be changed.

Regards,

Arun Kumar

 

Hi,

the UDID is a unique ID in the world for an Apple. In fact, when you need to register a device in the Apple provisioning profile to allow testing on Apple applications, it is the UDID you give, as it is a unique value. But there is another unique ID in the world for all devices, both apple, and android, like any other device.


  • Serial Number: This is a number unique to your iPhone or iPad that can be used to identify your device. Apple or your carrier will often ask for your serial number when providing support for your device, and you'll also need your serial number if you're looking to make a trade in.
  • UDID: Your Unique Device Identifier or UDID, is another number unique to your physical device used for identification purposes. Developers often use UDIDs when registering devices with the Apple Developer Program for use in development.
  • IMEI: Also known as the International Mobile Equipment Identify number, the IMEI is yet another unique ID number for your device. It's used by carriers to identify valid devices on their network. You might need this number if your phone was stolen and you want to stop it from being used.
  • Model Identifier: This is a number, not unique to your iPhone or iPad, that simply identifies the model of device you have. For instance, if you have an iPhone 7 Plus, your model identifier will be iPhone9,4.

Source: https://www.imore.com/how-find-your-iphones-serial-number-udid-or-other-information

Cheers

Hi  Miguel Verdasca,


Thanks for your response,

The solution that you have provided is to fetch the UDID from the device not programmatically. I need to to fetch the UUID of the device in runtime and it should not be changing whenever I reinstall the application.

Regards,

Arun Kumar

Hi,

Yes, that's right the UUID gets change whenever you install/re-install the app on the same device as well.


You can follow the below approach:

- Fetch the UUID from keyChain
- If found then refer it accordingly... of not then Fetch the UUID from the device & store it on keyChain
- Now the next time you fetch even after re-installation of app .. you will get the last UUID you stored on KeyChain.

You can use the OS Forge component for keyChain:
https://www.outsystems.com/forge/component-overview/1550/key-store-plugin

Note:

  • Keychain will reset when you reset your device.

  • If you want to handle the reset device scenario as well then I would recommend you to refer the APNS token from apple.. which will never ever change for that device .. once it is created & even when the app installed/re-installed it will be the same for that particular device.

  • Don't go for these options:
    - SharedPref: it's not at all an option for you .. coz even if you persist on the device, the moment the app is re-installed then things are gonn for you & you have no choice but to fetch the UUID again.
    - Fetching the token from Firebase i.e FirebaseToken will also change every time you install an app [ this option was considering you were using Firebase in mobile app ]



    Hope it helps,
    Assif



Hi assif_tiger ,

Thanks for your valuable response,

I have tried with the key store plugin that you have mentioned. After  the first installation I set this key with value as given in the below screenshot.

After I  reinstalled the same app in my device and this time I  directly clicked on the getvalue button, But I received the attached screen shot.

But previously after setting the key with value I  was able to get the value using the client action getvalue in the same installation.


My Question is 

Is that I need do any configuration change while generating the application? 



Regards,

Arun Kumar

Hi 

Can you post the snap of action where you fetch the same from Keychain..


Want to see what to pass as a key to fetch n where you are fetching it


And make sure you're using a new generated build on device...coz you added a forge plugin. 

Solution

Hi assif_tiger,


Thanks for your response,

I have used this cordova plugin to make the uuid of iPhone device none changeable even after the re installation of  the application and it works for me.

"url": "https://github.com/Paldom/UniqueDeviceID.git"

Note I'm using this only for iOS not for android.


Regards,

Arun Kumar

Solution

Happy to know,
That's even a good approach.