Here is a quick fix for Cr4zY , use only if you are really in a hurry (for example, I am now, a ship or a skill!) ...
Use a tool like 0xED http://www.suavetech.com/0xed/ to change the uniqueIdentifier binary libspotify to something like uniqueXdentifier . (Please note! Must have the same length or it will break badly !!!)
Then add a category method for UIDevice ie, like this in your project (using the same name that was changed)
static NSString *alternativeUniqueIdentifier = nil; #define DEFAULTS_KEY @"heartbreakridge" // "Improvise, adapt, overcome" - Clint Eastwood in DEFAULTS_KEY @interface UIDevice (CrazyFix) - (NSString *)uniqueXdentifier; @end @implementation UIDevice (CrazyFix) - (NSString *)uniqueXdentifier { if (!alternativeUniqueIdentifier) { @synchronized(self) { alternativeUniqueIdentifier = [[NSUserDefaults standardUserDefaults] stringForKey:DEFAULTS_KEY]; if (!alternativeUniqueIdentifier) { // XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX (capital hex) CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef); CFRelease(uuidRef); alternativeUniqueIdentifier = [(NSString*)CFBridgingRelease(uuidStringRef) lowercaseString]; alternativeUniqueIdentifier = [alternativeUniqueIdentifier stringByReplacingOccurrencesOfString:@"-" withString:@""]; alternativeUniqueIdentifier = [NSString stringWithFormat:@"%@%@", [alternativeUniqueIdentifier substringToIndex:8], alternativeUniqueIdentifier]; [[NSUserDefaults standardUserDefaults] setValue:alternativeUniqueIdentifier forKey:DEFAULTS_KEY]; [[NSUserDefaults standardUserDefaults] synchronize]; } } } return alternativeUniqueIdentifier; } @end
source share