ios - How to make unique identifier from device? -


this question has answer here:

i want know can used , stored on server apple device (ipod touch, iphone or ipad) make unique identifier? such imei or something... need unique app can 'once same device' validation.

thank you.

you can use nsuuid. changes, can implement calling first time app open , saving it.

    if ([[nsuserdefaults standarduserdefaults] boolforkey:@"haslaunchedonce"]) {         //app has launched  } else {     //first launch     nsstring *identifierstring = [[nsuuid uuid] uuidstring];     [[nsuserdefaults standarduserdefaults] setobject:identifierstring forkey:@"uuidkey"];      [[nsuserdefaults standarduserdefaults] synchronize]; } 

edit: more information , options available you, check out great article.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -