8 Replies Latest reply on Sep 22, 2014 1:01 PM by Jon Tara

    Problem in finding device unique id.

    Madhusudhan Reddy

      Hi All,

       

      Am developing an application where I need device unique id to register the device.

      I have tried with some of the methods(Rho::System.uuid,Rho::System.phoneId etc..) but these are not working in my case getting nil. Am using the device iPhone 5 to test my application. I want the unique id of the device may be imei number of any other which must be unique for device to device. In both ios and android devices.

       

      Please suggest me some solution if anyone know about it.

       

      -Thanks

        • Re: Problem in finding device unique id.
          Alexey Mironov

          Try

           

          Rho::System.phoneId

           

          I use it wall on WM (MC65)

          • Re: Problem in finding device unique id.
            Jon Tara

            Apple does not permit applications to acquire the unique device ID. It's a security concern. (This used to be possible.)

             

            You can try to synthesize one, but if you use it in an App Store app and get caught, the app will not be approved. If it is approved, you risk subsequent removal.

             

            Basically, if you get caught trying to identify the specific device in any way, your app will be banned.

             

            You can get a unique ID per installation of your product. I don't know if Rhodes supports this. The ID will change if the user removes your app and then re-installs it.

            1 of 1 people found this helpful
              • Re: Problem in finding device unique id.
                Madhusudhan Reddy

                Jon Tara,

                 

                Thanks for the reply. Yes, I have gone through some stuff about this in the internet. So how can we achieve it?

                Is there any alternative way ?

                 

                -Thanks.

                  • Re: Problem in finding device unique id.
                    Jon Tara

                    Is this app meant to be published in the App Store?

                     

                    If so, it doesn't matter. If you find an alternative way, Apple will ban the app in any case. What you want to accomplish is not allowed, and is a violation of the Developer Agreement to do so.

                     

                    If it is an Enterprise app, then you are free to do as you please, as Apple does not vet your apps. There are a number of open-source projects to synthesize unique IDs for iPhone. I don't have any details, as I don't have a need. But I am aware that they exist, and a search should turn them up.

                • Re: Problem in finding device unique id.
                  Siddhant  Wadhera

                  Hi

                  I am also facing the same issue when i use Rho::System.phoneId for iPhone 5

                   

                  All i get is nil.Though it works for android.

                  i Can't rely on on d's Being Synthesized as its a concern to security

                  Has anybody got a solution for this ??

                   

                  Thanks

                  Siddhant

                    • Re: Problem in finding device unique id.
                      Jon Tara

                      Apple does not permit developers to access the unique device ID. Nor to attempt to synthesize one. Period. This is an easy way to get yourself banned from the App Store.

                       

                      If you are creating an Enterprise app that will not be placed in the public App Store, though, your app is not vetted by Apple, and then you are free to synthesize a unique device ID. The APIs still will not give you the actual device ID.

                      • Re: Problem in finding device unique id.
                        Jon Tara

                        If you have an Enterprise app that will not be going in the public App Store, there are probably other ways to get a unique ID without synthesizing it.

                         

                        For example, I think you might be able to get an interface MAC address. (e.g. from WiFi, Bluetooth, etc.) As well, push IDs are device-unique, but are not to be used for any other purpose other than push, at least for App Store apps. This WILL get your app banned if they find out, and they will find out.

                         

                        Enterprise - find some work-around. App Store - fergidaboutit! Do not risk your developer agreement, as they can get nasty and will not only ban your app but cancel your developer agreement. Don't do it. Apple has gotten very serious about protecting user's privacy to the extent that they and the U.S. government are now sitting across a (virtual) table frowning at each other and making unpleasant gestures. Prosecutors, police, etc. are NOT happy. Apple is not budging for the government, and they aren't going to budge for you.