2

In my iPhone/iPad app's use case, there is a voting system and one device can send its vote once to the server. Therefore my server needs to identify user's device. I don't want the user to register an account because that makes the app complicate. However, I couldn't find a solution that works.

  • UDID is deprecated
  • I presume getting MAC address will get your app rejected by the app review process
  • I tried creating my own UUID using [[NSUUID UUID] UUIDString] and then storing it using NSUserDefaults, but the settings disappear if the user uninstalls the app
  • identifierForVendor is also reset when the user uninstalls the app
  • I considered advertisingIdentifier but because I'm not using it for advertisement, I presume it will also be rejected by the app review process

I'm not asking for a bulletproof solution in every situation. Just a solution that works even if the user uninstalls the app. Because I can generate my own UUID, I guess my question boils down to: How I can save data for the app that survives app uninstallation?

However if any of you have other approach, please feel free to inform me. Thanks.

august7cbfa7b7
  • 1,234
  • 1
  • 10
  • 13

1 Answers1

7

Save the UUID into the keychain.

  • Thanks for the pointer! Tried SFHFKeychainUtils and it works like a charm :) – august7cbfa7b7 Jun 16 '13 at 07:11
  • Thanks. Can view the sample source code at following link: http://stackoverflow.com/questions/21878560/how-to-preserve-identifierforvendor-in-ios-after-uninstalling-ios-app-on-device – Naveed Rafi Jul 12 '14 at 19:22