PDA

View Full Version : Unique id working on iPhone and Android



sarah_77
12 Dec 2011, 3:09 PM
Hi! I've read that in next version of iOS will not disponible GUID for identify device.

I'm creating a PhoneGap for Android and iPhone using Sencha Touch 2.0 and I'd like to find a solution for generate and unique ID that allows to identify device and for know (recalculate) same GUID also after delete and re-install of my app.

If GUID calculate is 12345678

must be same also if I delete app and on same device I install it another time

Thansk

mitchellsimoens
13 Dec 2011, 7:20 AM
We do have a new class, Ext.data.UuidGenerator that you can use but does PhoneGap give you anything that is unique to the device? WebKit doesn't but since PhoneGap gives you more access it may.

sarah_77
13 Dec 2011, 8:06 AM
Thanks for your reply!

I don't know this:



Ext.data.UuidGenerator

Can I use this solution in my project?? (PhoneGap + SenchaTouch 2.0 on iPhone and Android)?? Or not??



but does PhoneGap give you anything that is unique to the device?

Can't I use this: Ext.data.UuidGenerator??


Thanks

mitchellsimoens
13 Dec 2011, 8:08 AM
Ext.data.UuidGenerator has been apart of ST2 since PR1. The problem is that there isn't anything unique to the device, if you uninstall an app, how will you be able to reliably create the exact same id? You can save to local storage but what happens when someone clears local storage?

sarah_77
13 Dec 2011, 8:36 AM
It this, I don't need Ext.data.UuidGenerator

What about a GUID generated using MAC??

But nobody of you have this need??? Identify (always) a device for logs/feedback/lastupdate info.... etc??

Why lose all info about device if use delete (and re-install) app?

Thanks

mitchellsimoens
13 Dec 2011, 8:37 AM
Can you get it using phonegap?

sarah_77
13 Dec 2011, 9:15 AM
Can you get it using phonegap?

I don't know this :(

I'd like to find a solution that works on Android and iPhone (using PhoneGap or Sencha Touch)

rdougan
13 Dec 2011, 10:22 AM
I'm sure there are ways to do this, but it is a PhoneGap issue, not a Sencha issue.

sarah_77
14 Dec 2011, 1:22 AM
So right way is use PG??

And what do you think to create ad info on localstore with MAC_GUIDGeneratedLocally

using Sencha Touch

and keep saved this info also when app is deleted?? (Android and iPhone)


I'm also searching righr solution :(

mitchellsimoens
14 Dec 2011, 6:15 AM
Using the MAC to create an id would be good as the MAC should be unique to every device. I would some means of encrypting it as you don't just want to use the MAC address in plain text. You should save it to local storage so that the client knows about it. At app startup, get that id from local storage and use it, if it doesn't exist, then that's when you would generate a new one.

sarah_77
14 Dec 2011, 6:49 AM
What does that mean?


I would some means of encrypting it as you don't just want to use the MAC address in plain text.

What does that mean??




So I can use MAC, save on local store and pass this to my remote WebServices??

What about devices with 2 MAC addresses?

Thanks

mitchellsimoens
14 Dec 2011, 6:52 AM
Do some hashing.... md5 is my preferred way. If there are two, pick one... are they reliably always in that order? If so, then use the first one.

sarah_77
14 Dec 2011, 7:59 AM
are they reliably always in that order?

This was exactly my question :)) Do you know this??

About MD5... do you mean: read MAC, encrypt using MD5, tranfer to my WS ... Server side decrypt for know original MD5

OK?

Thanks

mitchellsimoens
14 Dec 2011, 8:02 AM
This was exactly my question :)) Do you know this??

About MD5... do you mean: read MAC, encrypt using MD5, tranfer to my WS ... Server side decrypt for know original MD5

OK?

Thanks

Wouldn't ask if I did know. You won't be able to decrypt MD5 which is a good thing. You should never know someone's MAC address... you just need a unique string which is the encrypted MAC address.

sarah_77
14 Dec 2011, 8:31 AM
mmmm and will be a problem pass MAC address??
Could I have problem with Apple app approvation??

mitchellsimoens
14 Dec 2011, 8:37 AM
mmmm and will be a problem pass MAC address??
Could I have problem with Apple app approvation??

I'm not sure but it would be a security problem to send MAC address over HTTP. All you need is a unique string right? Then it shouldn't matter if it's the MAC address or a randomly created one

sarah_77
15 Dec 2011, 3:08 AM
Yes!!!! but I need that this code is the same also after delete and re-install app!!!!!

I've to identify each device with an unique solution (and my problem is that iOS will cancel uid features)

sarah_77
16 Dec 2011, 3:18 PM
With MAC I can have problem with many devices with many MAC address.

So, what do you suggest me??? I'd like to find a solution for identify each device (on Iphone and Android) .... if possibile also after deleting app and reinstalling it

Thanks

steve1964
17 Dec 2011, 1:40 PM
Why dont just use the uuid?
http://docs.phonegap.com/en/1.2.0/phonegap_device_device.md.html#device.uuid

sarah_77
20 Dec 2011, 12:17 AM
Because Apple tell that uid in iOS is deprecated... and I don't want to create an app that will not works in next release of iOS... ot not?

Thanks

sarah_77
4 Jan 2012, 2:06 PM
Do you've any idea for resolve this problem?? If OS will not have unique id feature.... how is it possible to identify device also after app delete and re-install?

Thanks

sarah_77
7 Jan 2012, 7:35 AM
But if unique id is deprecated for Apple...

If I'll use:
http://docs.phonegap.com/en/1.2.0/ph...ml#device.uuid

D (http://docs.phonegap.com/en/1.2.0/phonegap_device_device.md.html#device.uuid)o you confirm me that I'll not have problem?? This solution isn't related to Apple unique id used for devices?

Thanks

rdougan
7 Jan 2012, 10:18 AM
This is not information you will find out here. You need to either post on iOS forums or PhoneGap forums.

sarah_77
9 Jan 2012, 4:37 PM
Thanks for your reply! Yes I'm doing this.

But, suppose that I generate in PhoneGap, ho can I use in Sencha Touch code??

and ... suppose that I generate something in Sencha Touch, how can I use in PhoneGap.

I hope that you can help me

Thanks

rdougan
9 Jan 2012, 4:38 PM
That would require a PhoneGap plugin, nothing you can do on the JS side of things unfortunately.