Xcode: “uniqueIdentifier deprecated”?

The "Special Considerations" section in the documentation tells you what the recommended way of obtaining a unique identifier is now.

The "Special Considerations" section in the documentation tells you what the recommended way of obtaining a unique identifier is now: Do not use the uniqueIdentifier property. To create a unique identifier specific to your app, you can call the CFUUIDCreate function to create a UUID, and write it to the defaults database using the NSUserDefaults class.

I would suggest changing over from uniqueIdentifier to this open source library (2 simple categories really). It utilizes the device’s MAC Address along with the App Bundle Identifier to generate a unique ID in your applications that can be used as a UDID replacement. Keep in mind that unlike the UDID this number will be different for every app.

You simply need to import the included NSString and UIDevice categories and call: #import "UIDevice+IdentifierAddition. H" #import "NSString+MD5Addition. H" NSString *iosFiveUDID = UIDevice currentDevice uniqueDeviceIdentifier In order to grab the generated device identifier.

You can find it on Github here: https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5 Heres the code (just the . M files - check the github project for the headers): UIDevice+IdentifierAddition. M #import "UIDevice+IdentifierAddition.

H" #import "NSString+MD5Addition. H" #include // Per msqr #include #include #include @interface UIDevice(Private) - (NSString *) macaddress; @end @implementation UIDevice (IdentifierAddition) //////////////////////////////////////////////////////////////////////////////// #pragma mark - #pragma mark Private Methods // Return the local MAC addy // Courtesy of FreeBSD hackers email list // Accidentally munged during previous update. Fixed thanks to erica sadun & mlamb.

- (NSString *) macaddress{ int mib6; size_t len; char *buf; unsigned char *ptr; struct if_msghdr *ifm; struct sockaddr_dl *sdl; mib0 = CTL_NET; mib1 = AF_ROUTE; mib2 = 0; mib3 = AF_LINK; mib4 = NET_RT_IFLIST; if ((mib5 = if_nametoindex("en0")) == 0) { printf("Error: if_nametoindex error\n"); return NULL; } if (sysctl(mib, 6, NULL, &len, NULL, 0) @implementation NSString(MD5Addition) - (NSString *) stringFromMD5{ if(self == nil || self length == 0) return nil; const char *value = self UTF8String; unsigned char outputBufferCC_MD5_DIGEST_LENGTH; CC_MD5(value, strlen(value), outputBuffer); NSMutableString *outputString = NSMutableString alloc initWithCapacity:CC_MD5_DIGEST_LENGTH * 2; for(NSInteger count = 0; count.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions