问题
I'm trying to upload an application to AppStore but soon as its uploading I get this error:
Your app contains non public API usage. Please review the errors, correct them, and submit your app again.
Apps are not permitted to use the UDID, and must not use the unique identifier method of UIDevice. Please update your app's servers to associate with the vendor or advertising identifier introduced in iOS6.
Shouldn't these errors be displayed? I cant find any code that access the UDID.
回答1:
You are likely making a call somewhere to UIDevice uniqueIdentifier. This has been deprecated for a while (and just recently is causing rejection from the app store). You need to remove these calls and use some other method of generating a unique identifier.
No errors are displayed because this is actually not an error. It is perfectly valid code, just not code that Apple wants to allow in its ecosystem any more.
回答2:
If you are using a third party framework such as for ads or tracking make sure you download the latest version of whatever it is, all of them should now be avoiding UDIDs. Originally all of them used them.
回答3:
You need to replace [[UIDevice currentDevice] uniqueIdentifier] with other method. please refer this url http://iphonedevsdk.com/forum/iphone-sdk-development/113801-app-rejected-due-to-non-public-api-and-udid.html
来源:https://stackoverflow.com/questions/16569769/appstore-submission-denied-apps-are-not-permitted-to-use-the-udid