Unique device ID

462 views
Skip to first unread message

Sarah

unread,
Dec 28, 2011, 5:47:25 PM12/28/11
to Easy APNs
Excuse me if I write this again but I don't want have problem in next
months!

Considering that apple will consider deprecated device unique id

and considering and Easy APNS uses device unique id for identify
device and send message .... we'll have problems when we'll not have
this device unique id?

Thanks

John Jones

unread,
Dec 28, 2011, 6:07:17 PM12/28/11
to easy...@googlegroups.com
just create your own id in the app, and transition away from using the uuid.

Apple actually use the device token which is different to the uuid, you do not need to use the uuid at all (I have not been using that for over a year.)

J

> --
> You received this message because you are subscribed to the Google
> Groups "Easy APNS" group.
> To post to this group, send email to easy...@googlegroups.com
> To unsubscribe from this group, send email to
> easyapns+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/easyapns?hl=en

Sarah

unread,
Dec 29, 2011, 3:11:54 AM12/29/11
to Easy APNs
Thanks for you reply! Do you mean that mean that Easy APNS saves uid
in apns tables but it isn't used??
Only device token is used by APNS?? So I could delete this column from
apns tables and all can work without this info?

Thanks!

John Jones

unread,
Dec 29, 2011, 3:40:04 AM12/29/11
to easy...@googlegroups.com
Hi

I dont use the apns any more, I wrote my own system (for working with drupal)

But if you swap the uid to be a auto increment number I can not see why that would not work, APNS needs the message to be sent to a device token, it does not care about the uid, this is only if you want to identify the actual device that you are sending messages to, say if you are targeting specific devices, but there are other ways to do this yourself (create a id for the device within your application, and use that if you need to identify devices in your system.) if you are using them to update the settings (receive push notifications etc, then I would use the device token, as this is specific for device and app.)

J

Sarah

unread,
Dec 29, 2011, 1:45:14 PM12/29/11
to Easy APNs
Thanks for your kindly reply! So with device token I can do
all ...without using guid! Greeeat!

I'm also tring to generate an app uid for identify each user/device
locally but I've not yet found a solution for have an uid that can be
generated with same value also when user cancell and re-install app! I
need that each single device can be identified with a specific uid...
and make this working on Android and iPhone (using Phone gap)

John Jones

unread,
Dec 30, 2011, 6:08:04 AM12/30/11
to easy...@googlegroups.com
Can you get the users to registerer a username against your system, email address etc, this would be unique? And could be easilly shared between android and ios

Sarah

unread,
Dec 30, 2011, 3:49:28 PM12/30/11
to Easy APNs
Yeahhh but I'd like a solution without user registration... as for uid
that I had in iOS... without this deprecated feature all should be OK!
But now I've to find another way for generated an universal uid
working on iOS and Android over Phone Gap

Sarah

unread,
Jan 1, 2012, 4:17:01 PM1/1/12
to Easy APNs
Please can you help me to resolve this problem?? I'd like to find
right way!!!!

Thanks

John Jones

unread,
Jan 2, 2012, 5:39:58 AM1/2/12
to easy...@googlegroups.com
there are algorithms for creating uuid's and if you want them to be unique per device and persistent then create on device, and store, another option is when they register, send back a unique identifier then.

Dandy

unread,
Jan 3, 2012, 1:43:04 AM1/3/12
to easy...@googlegroups.com
Thanks for your reply but I don't know what do you mean :(

John Jones

unread,
Jan 3, 2012, 4:41:26 AM1/3/12
to easy...@googlegroups.com
To create a uuid in objective C use something like this

+ (NSString*) stringWithUUID {
   CFUUIDRef uuidObj = CFUUIDCreate(nil);//create a new UUID
   //get the string representation of the UUID
   NSString *uuidString = (NSString*)CFUUIDCreateString(nil, uuidObj);
   CFRelease(uuidObj);
   return [uuidString autorelease];
}

Then store this as a property in the app, and you have your ownUUID for the app on that device, there are similar functions for Java.

J

On 3 Jan 2012, at 06:43, Dandy wrote:

Thanks for your reply but I don't know what do you mean :(

Sarah

unread,
Jan 4, 2012, 8:37:45 AM1/4/12
to Easy APNs
Thanks for your reply and for help me!!

Do you confirm that with your solution I'll not have problems if Apple
will delete uid feature??
I mean: with your solution I'll not use Apple solution and I'll have
same uid generated if I delete and re-install app?

Thanks

Sarah

unread,
Jan 4, 2012, 8:52:21 AM1/4/12
to Easy APNs
So!! Isn't there a solution for resolve my problem? (keep uid also
when I delete and re-install app)

Thanks

John Jones

unread,
Jan 4, 2012, 9:24:25 AM1/4/12
to easy...@googlegroups.com
There is some persistant storage you can possibly use, but dont know if thats allowed.

They should get the same devicetoken if they delete and reinstall the app, you can test this on your device, by uninstalling, then reinstalling and seeing if its the same devicetoken.

J

Hutch Hicken

unread,
Jan 4, 2012, 9:48:04 AM1/4/12
to easy...@googlegroups.com
The privacy mob disliked the whole idea of a device id or any way to uniquely identify a device and Apple appears to have conceded the point.

Accordingly, Apple has gone through some significant effort precisely to defeat what you are trying to accomplish here. Device token is subject to (and does) change. Device uid is deprecated. Use of persistent storage outside of sandbox space cleared when the app is installed is expressly verboten.

You have two options of unique identification in apple world. The first is checking the receipt of an in-app purchase when a user expressly restores it (in which case you get a unique hash). The second is requiring the user to login. The days of magical persistent unique identification with no user interaction on iOS are gone.

John Jones

unread,
Jan 4, 2012, 10:02:38 AM1/4/12
to easy...@googlegroups.com
Thanks for clearing that up, knew they were heading in that direction, and all the apps that I have done so far have login, or some subscription so I can identify users across devices, os's and even websites when they use the login etc.

John

Dandy

unread,
Jan 4, 2012, 4:00:20 PM1/4/12
to easy...@googlegroups.com
Thanks for your detailed reply!!

What about this solution:   

The first is checking the receipt of an in-app purchase

??

Thanks 

spring

unread,
Jan 5, 2012, 1:27:16 AM1/5/12
to Easy APNs
for security reasons I prefer not to have in mySQL any UDID, or device
name.
specifically because I don't really need it to generate the PUSH
message (just need the token)

Since Token is unique, if I will copy it to the device UDID (so both
UDID and token will be token)
should it still work ?

for device name I just copy the device language (more important for
future send push in native language)

Since I want to upload my first version with EasyAPN this week ,
I will be happy if someone can help me with this answer soon.

Bagusflyer

unread,
Jan 4, 2012, 7:42:22 PM1/4/12
to easy...@googlegroups.com
I think you can use the token id which should be unique for different device.

John Jones

unread,
Jan 5, 2012, 5:24:42 PM1/5/12
to easy...@googlegroups.com
That will work fine, or just make the device id not a required field, and dont pass it along with the other parameters when registering the devices.

Some of my systems pass only the token, and if they want to recieve alerts etc.

J

Dandy

unread,
Jan 5, 2012, 5:28:11 PM1/5/12
to easy...@googlegroups.com
But I'd like a solution for Android and iPhone both devices! device token is ok for APNS .... because of returned from apple..... I need a way for have a uid working also on Android

Thanks

John Jones

unread,
Jan 5, 2012, 5:50:17 PM1/5/12
to easy...@googlegroups.com
To do that you need to have customers register to tie them in, or just give you an email address, you do not need to store the email address (store a hash (md5) of it if you dont want email addresses in the db.

The previous answer was for somebody that did not want the devicename or udid in the db.

J

Stéphane

unread,
Feb 10, 2012, 6:37:42 AM2/10/12
to Easy APNs
Can you share your code for Drupal?

John Jones

unread,
Feb 15, 2012, 2:42:13 AM2/15/12
to easy...@googlegroups.com, Easy APNs
Hi

It will be hopefully a contrib module within a couple of weeks, a couple of little issues i want to sort first.

John

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages