2

Non-public API usage:

Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.

Kindly help me how to i avoid his problem.

Regards John

John
  • 83
  • 1
  • 7
  • Are you using the `uniqueIdentifier` method of UIDevice? If so, you may wish to use `identifierForVendor` instead. The error describes the issue pretty well -- I'd read over it again. – cjc343 May 08 '13 at 20:04
  • Iam created application using phonegap based application. – John May 08 '13 at 20:08
  • I uploaded version1.0 to itunes sucessfully but now apple will not accept my binary – John May 08 '13 at 20:09
  • Then the last part may be especially applicable (if you don't think you're using `uniqueIdentifier` anywhere in your code): "note that one or more of the above APIs may be located in a static library that was included with your app" especially if you're using an older version, or a plugin which hasn't been updated recently. – cjc343 May 08 '13 at 20:10
  • You may want to take a look at the property `[identifierForVendor]`(https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/doc/uid/TP40006902-CH3-SW49) of `[UIDevice]`(https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIDevice_Class/Reference/UIDevice.html) class. – Tchelow May 08 '13 at 20:10

3 Answers3

7

Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6

Theres your answer.

"Starting May 1, the App Store will no longer accept new apps or app updates that access UDIDs. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6"

Source

Apple now block any App which accesses the uniqueIdentifier property of UIDevice. Replace any occurrence with the Vendor or Advertising identifiers or use OpenUDID.

NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];

A few StackOverflow questions which may be of help:

If you haven't used uniqueIdentifier yourself, then it will be an SDK Library calling it. Normally from an ad network such as Mobclix, AdMob or Smaato. All the popular ad networks have updated SDK's which remove uniqueIdentifier. Check their websites for the latest SDK.

Update

Just seen in the comments you're using PhoneGap, guessing you haven't updated to the latest version.

Make sure your using the latest version (2.7.0) from http://phonegap.com/download/ (Released 30 Apr 2013)

Community
  • 1
  • 1
Leon Storey
  • 3,274
  • 2
  • 25
  • 40
6

I got the same issue and Apple gave me some tips to find out the Places that use "uniqueIdentifier" API call. Even in a binary lib.

"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.

Additionally, if you are linking an external framework, such as an advertising library, these third party libraries may be accessing and using UDIDs. We encourage you to update your libraries to the most recent versions and use the "nm" tool to determine if the libraries are calling this method.

For more information on the "nm" tool, please see the manual page for the "nm" tool in Xcode Tools:

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nm.1.html

Additionally, if you do not have access to the libraries's source, you may be able to search the compiled binary using "strings" or "otool" command line tools. The "strings" tool can output a list of the methods that the library calls and "otool -ov" will output the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides."

Hope it helps

  • Thanks Ishara, are you able to solved this problem ? I am not too Good in shall script. String command and otool. Please let me know if you can any help me. Thanks – Mangesh May 13 '13 at 06:50
  • 1
    in the root folder of your xCode project, do `find . -name "*.a" -print` to find the `.a` libraries. For each `` produced, do `strings | grep unique` to see if the method call is present. I didn't find `otool -ov ` useful - indeed, it crashed on one library. – emrys57 May 13 '13 at 10:03
0

I am using this method to create a Unique Identifier.

Is this now not allowed. It was a month ago when release a previous version of my app.

- (NSString *)uuid
{
    CFUUIDRef uuidRef = CFUUIDCreate(NULL);
    CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
    CFRelease(uuidRef);
    return [(NSString *)uuidStringRef autorelease];
}

What else can I use to create a unique identifier.

Cheers

Shane

Shane
  • 39
  • 5