fabiocaccamo / FCUUID

:iphone: :id:  iOS UUID / Universally Unique Identifiers library as alternative to UDID and identifierForVendor.
MIT License
1.61k stars 226 forks source link

What if user doesn't use iCloud? #4

Closed rmvz3 closed 9 years ago

rmvz3 commented 9 years ago

Hi, I find your library is perfect to accomplish my client's app requirements and identify users. I'd need to use the uuidForDevice method to identify the user device. However I have a few questions:

-As I understand your library, it relies in NSUbiquitousKeyValueStore to persist across installations but, what happens if the user is logged out or even never created a iCloud account? This app is meant to be used mostly by old people so this can be an usual scenario. If this is the case, there's nothing to do, Am I right? Or there is any kind of automatically generated iCloud id created on iPhone activation?

-Can you identify just the current device instead of every user devices?

Thank you very much

Ricardo Mantero

fabiocaccamo commented 9 years ago

Hi Ricardo, the only one method which depends on NSUbiquitousKeyValueStore (then iCloud) is uuidsOfUserDevices.

uuidsOfUserDevices uses iCloud because it's the only way to share data of the same user across his devices without any login.

uuidsOfUserDevices returns the uuids of all devices of the current user.

If iCloud is not available or disabled uuidsOfUserDevices returns only the uuid of the current device.

rmvz3 commented 9 years ago

Ok. Fabio, thank you for answering so quickly.

Then I could identify an unique device even after a restore without have been signed in iCloud?

That would be just too good to be true :D

fabiocaccamo commented 9 years ago

If you just need to identify a device you should use uuidForDevice.

uuidForDevice uses keychain, so the uuid could persist even after a restore, it depends by the backup, read this: http://stackoverflow.com/questions/18491143/does-ios-keychain-storage-persist-when-restoring-an-app-to-a-new-device

rmvz3 commented 9 years ago

Thank you, Fabio.

El 13 nov 2015, a las 10:25, Fabio Caccamo notifications@github.com escribió:

Closed #4 https://github.com/fabiocaccamo/FCUUID/issues/4.

— Reply to this email directly or view it on GitHub https://github.com/fabiocaccamo/FCUUID/issues/4#event-463398674.