Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
Brings back the unique identifier support under iOS 5, it uses the device's mac address in combination with the bundle identifier to generate a new hashed unique identifier.
https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
Last synced: 2 months ago
JSON representation
Brings back the unique identifier support under iOS 5, it uses the device's mac address in combination with the bundle identifier to generate a new hashed unique identifier.
- Host: GitHub
- URL: https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
- Owner: gekitz
- License: mit
- Created: 2011-08-20T09:19:59.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-18T13:55:27.000Z (over 11 years ago)
- Last Synced: 2024-10-29T22:32:00.356Z (3 months ago)
- Language: Objective-C
- Size: 148 KB
- Stars: 1,236
- Watchers: 72
- Forks: 227
- Open Issues: 11
-
Metadata Files:
- Readme: README.markdown
- License: license
Awesome Lists containing this project
- awesome - UIDevice-with-UniqueIdentifier-for-iOS-5 - Brings back the unique identifier support under iOS 5, it uses the device's mac address in combination with the bundle identifier to generate a new hashed unique identifier. (etc)
- awesome - UIDevice-with-UniqueIdentifier-for-iOS-5 - Brings back the unique identifier support under iOS 5, it uses the device's mac address in combination with the bundle identifier to generate a new hashed unique identifier. (etc)
README
** NOTE: this is not going to work under iOS 7 **
# Description
Apple stopped supporting a unique identifier for iOS. This source code solves the problem. It generates a unique identifier based on the mac address of the device in combination with the bundle identifier.
What you need to do:
- copy `NSString+MD5Addition` and `UIDevice+IdentifierAddition` to your project.
- if your are using ARC in your project, you have to add the `-fno-objc-arc` flag to both files. [Apple ARC Guidelines](http://developer.apple.com/library/mac/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html)
- use `[[UIDevice currentDevice] uniqueDeviceIdentifier]` to retrieve the unique identifier (it's a hash of your Bundle ID + MAC address)
- use `[[UIDevice currentDevice] uniqueGlobalDeviceIdentifier]` to retrieve a global unique identifier (it's a hash of the MAC address, used for tracking between different apps).
- have fun and follow [gekitz](http://twitter.com/gekitz) ;)
//Thanks to Erica Sadun for her UIDevice+Hardware Addition (used for the mac address retrieval).
# License
see license file.