Libspotify causes Apple App Store to crash

It seems that Apple has tightened applications for applications in the App Store, starting May 1. I have an application that uses Spotify and has been hosted on the App Store several times. In a recent update, the application was rejected for the following reasons ...

Non-public use of the API:
Applications are not allowed to access the UDID and should not use the uniqueIdentifier UIDevice method. Update your apps and servers to associate users with the vendor or ad IDs introduced in iOS 6.

Performing the following steps in libspotify

strings libspotify | grep uniqueIdentifier 

3 instances of uniqueIdentifier returned. Another publication states that this is probably related to openSSL and may not have anything to do with UDID. However, Apple refuses the code. Is there any work?

+3
source share
3 answers

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 
+4
source

Disclaimer: I work for Spotify

We are aware of this issue and are working on a hot fix for iOS that eliminates the need to access UDIDs. Hold on tight!

Edit : fixed fix! Take it http://developer.spotify.com/technologies/libspotify . The corresponding release of cocoalibspotify will be available soon, but at the same time, it can be easily changed to support a different version number of libspotify.

+2
source

A fix has been issued, excluding the use of uniqueIdentifier:

http://devnews.spotify.com/2013/05/16/libspotify-12-ios-hot-fix/

+2
source

All Articles