Can a native iPhone app access the wifi chip's mac address?
If so what about other unique hardware ids?
Thanks!!
In the class UIDevice
, there was a method uniqueIdentifier
. But it has been deprecated in iOS 5. You can still use it, but it's a bad idea, as it is expected to disappear.
One replacement is OpenUDID: it is an open source initiative to replace the UDID method. https://github.com/ylechelle/OpenUDID
Make a UUID and storage it in the users default database
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults synchronize];
CFUUIDRef uuidObj = CFUUIDCreate(NULL);
NSString *user = (NSString *)CFUUIDCreateString(NULL, uuidObj);
CFRelease(uuidObj);
uuid = user;
[defaults setObject:uuid forKey:uuidjettec];
[defaults synchronize];
if you need a unique identifier, maybe the MAC address is your solution. you can check this link How can I programmatically get the MAC address of an iphone
regards