1

Recently apple has reject apps that uses the unique device identifier (UDID), in my app i am creating once aCFUUIDRef for each device on the first time, which works great. in my app i am giving to a new user 10 clicks on a button (some service), when i am creating a device id for the first time it sends to the server and this id is now have credit of 10 clicks. the problem is when the user delete my app it generate a new identifier. how can i write some file to the iphone withe an identifier lets say for example "MyCustomDeviceID" and when a user download the app i am checkin if this file is existing, if it does i am getting the saved parameter and if it doesn't i am creating the identifier and then creating the document. i got to have some way to leave a mark on the iphone.

ideas will be appreciated!

4

2 に答える 2

3

CFUUIDRefを に変換できると仮定するとNSString、キーチェーンに格納できます。キーチェーンに保存されたアイテムは、アプリを削除しても保持されます。PDKeychainBindingsControllerを参照してください。

于 2012-11-23T08:36:28.030 に答える
1

iOS では、アプリケーションの削除後にデータを保存して維持する「共有スペース」がありません。他の方法でそれを行う必要があります:

  • アプリで iCloud を有効にし、NSUbiquitousKeyValueStore を使用して ID を保存できます。

  • 識別子を NSUserDefaults に保存できるため、アプリを削除してから再インストールすると、バックアップで利用できるようになります。(明らかに、ユーザーはバックアップから復元する必要があります)

  • または、識別子を名目上のアカウントに関連付けることができます。(ユーザーがこの名目上のアカウントで登録およびログインできるシステムを作成する必要があります)

于 2012-11-22T13:39:38.153 に答える