iOSAppDev
iOSAppDev

Reputation: 2783

Is it a good idea to store device identifier in keychain for iOS app

As Apple Deprecated uniqueIdentifier in iOS 5, I was thinking to use CFUUIDCreate function to create a UUID. But when I call CFUUIDCreate everytime , it creates new UUID. So my plan was to use CFUUIDCreate when app launches for very first time & store it in NSUserDefaults. So if user deletes or reinstalls the app , UUID will be delted. So I was wondering if I can store generated UUID in Keychain. So my questions are

1) If I delete the app , then UUID will be present in keychain or not ? 2) Is it a good idea to store it in keychain ?

I have take a look at gekitz

But I want to use only MAC Address of device then does Apple allow developer to retrive MAC Address of device?

Any knid of help is highly appreciated. Thanks in advance.

Upvotes: 1

Views: 2357

Answers (1)

maza23
maza23

Reputation: 555

yes, but also set

[keychain setObject:(id)kSecAttrAccessibleAlwaysThisDeviceOnly forKey:(id)kSecAttrAccessible];

Upvotes: 2

Related Questions