0

Please, do not mark this as a duplicate. This question is about Simperium and the way it deals with uniqueIdentifier and identifierForVendor.

Simperium is still using [[UIDevice currentDevice] uniqueIdentifier] in Simperium.m. This has been deprecated and Apple is now completely rejecting apps that use that call.

I am experimenting with [[[UIDevice] currentDevice] identifierForVendor] UUIDString]; but I am not sure if there would be any problem doing so.

What do you say?

Best,

user1026529
  • 15
  • 1
  • 4
  • Agreed re: the duplicate. Since I can't post an answer, this approach would be fine from Simperium's point of view. An alternate fix has also been applied in the develop branch (you can see this issue for reference: https://github.com/Simperium/simperium-ios/issues/60). – mikejohnstn May 27 '13 at 21:47

3 Answers3

0

According to Apple documents identifierForVendor can be used from iOS 6.0 and later so no issues in using identifierForVendor

Deepesh Gairola
  • 1,252
  • 12
  • 18
0

It is should work. Because they say

"While you may have removed access and usage of UDIDs from your app, the invalid binary message indicates that your app uses or accesses UDIDs. Please check your source code for any occurrence of the "uniqueIdentifier" method; this is the method that returns a device's UDID."

So it is only matter of using "uniqueIdentifier" method.

Thanks

0

You can also use this method for fetching uniqueidentifier for your app.

- (NSString *)createUUID{

NSString *uIdentifier = [[NSUserDefaults standardUserDefaults] objectForKey:@"Unique identifier for test"];

if (!uIdentifier) {

    CFUUIDRef uuidRef = CFUUIDCreate(NULL);

    CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);

    CFRelease(uuidRef);

    uIdentifier = [NSString stringWithString:(NSString *)CFBridgingRelease(uuidStringRef)];

    [[NSUserDefaults standardUserDefaults] setObject:uIdentifier forKey:@"Unique identifier for test"];

    [[NSUserDefaults standardUserDefaults] synchronize];

}

return uIdentifier;

}

ASP
  • 88
  • 5