问题
Today we received a feedback about our submission and we do not understand the reported problem: "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.".
We know about the rejections about udid, but our App do not use this! After read this, our team reevaluated the App and we do not found occurrences from "UIDevice uniqueIdentifier". We also revised all used libraries and really we do not find any call from UDID.
Someone have ideas?
After research, I executed "greap" command and I am suspecting about FacebookSDK:
my-app-directory $ grep -Rnis 'uniqueIdentifier' *
Binary file MyApp/FacebookSDK.framework/FacebookSDK matches
Binary file MyApp/FacebookSDK.framework/Versions/A/FacebookSDK matches
Binary file MyApp/FacebookSDK.framework/Versions/Current/FacebookSDK matches
Binary file MyApp/MyApp.xcodeproj/project.xcworkspace/xcuserdata/myuser.xcuserdatad/UserInterfaceState.xcuserstate matches
FacebookSDK uses uniqueIdentifier?? Whats the resolution?
回答1:
In My case it was ibGoogleAnalytics_debug.a library.
To find which library is using uniqueidentifier method, go to your project folder and type in:
$ find . | grep -v .svn | grep "\.a" | grep -v "\.app" | xargs grep uniqueIdentifier
I got this: Binary file ./My_Project/libGoogleAnalytics_debug.a matches
回答2:
Solved it: The problem is that your project still refer to the old SDK and it compiles the code with your old sdk methods including the UDID which apple rejects.
Fix it in your build properties of SEARCH PATH Framework Search Paths Library Search Paths
remove unnecessary values such as old sdk path and put there your current sdk path
clean all project's files: Window->Organizer->Project - delete your project Product->Clean
Now rebuild it and resubmit it to apple.
Enjoy :)
回答3:
Check the binary you generated with the strings
command, and look for uniqueIdentifier
:
$ strings YOUR_BINARY | grep uniqueIdentifier
It is likely you're going to find it in there.
I found that OpenSSL has a string uniqueIdentifier
declared in their headers, so it's probable your application (or any static library you're providing with your app) has included it.
In my case the culprit was libspotify
.
回答4:
In my case for this problem was responsible BugSense SDK (I used obsolete version). After upgrading to the newest version (3.1.3) everything is ok.
回答5:
I had the same issue, but was able to pin-point the file containing uniqueIdentifier
using the following command in terminal, within my project folder.
grep -Rnis 'uniqueIdentifier' *
This echo'd out a bunch of lines in my terminal window, with the culprit being libGoogleAdModAds.a - even though I wasn't actually using it in my code, it was still referenced in my project and therefore added to the build.
my source was: http://www.commandlinefu.com/commands/view/3573/search-for-a-string-inside-all-files-in-the-current-directory
回答6:
I filed a bug with Facebook, but here is a workaround:
https://developers.facebook.com/bugs/193119420841692
In the sdk, edit facebook-ios-sdk/src/FBSession.m
Comment out the
- (BOOL)isMultitaskingSupported {
/*
UIDevice *device = [UIDevice currentDevice];
return [device respondsToSelector:@selector(isMultitaskingSupported)] &&
[device isMultitaskingSupported];*/
return TRUE;
}
Its not needed since IOS 4.0 anyhow.
that removes the reference, and re-build the .a
回答7:
I have the same issue today. I upgrade AdMob SDK to 6.4.1 and submit again but no use. But it passed upload check after I disabled AdMob code and don't link to its library.
According to Google's announcement, AdMob SDK 6.4 and above do not access UDID anymore. Obviously, Apple doesn't think so.
回答8:
Usually third party libraries for analytics and beta testing use uniqueIdentifier to track users (for example test flight or old versions of GA), check if any of the third party library you are using use this. If is not the case, you can ask for a clarification at http://itunesconnect.apple.com.
回答9:
I had the same problem yesterday updating my applications.
After search for third parties libraries using UDID I realized I was using Conversion Tracking for iOS. This library used UDID but the the April 10 released an update fixing this problem:
The iOS conversion tracking SDK v1.2.0 no longer accesses UDID (released April 10, 2013).
I hope it helps.
回答10:
I tried all the day, my app is always rejected.
First, I tried find . | grep -v .svn | grep ".a" | grep -v ".app" | xargs grep uniqueIdentifier in my project folder.
It appeared that Google Analytics, AdMob and Wikitude SDK were using uniqueIdentifier. So I removed GA, and I updated AdMob and Wikitude. Now, there is no more calls to the uniqueIdentifier method. When I do grep, the result is nothing. I cleaned everything in my project, but my app is always rejected !
What can I do now ? Any help will be appreciated ...
EDIT : I found this line :
IDEWorkspaceWindowController***UniqueIdentifier***_IDEActiveWorkspaceTabController_IDE
In this file :
MYPROJECT.xcodeproj/project.xcworkspace/xcuserdata/MYUSERNAME.xcuserdatad/UserInterfaceState.xcuserstate
Do you think the problem can come from this line ?
回答11:
I don't think the Facebook IOS SDK itself uses the deprecated 'uniqueIdentifier'. I looked into the sources at https://github.com/facebook/facebook-ios-sdk.
But when the Facebook SDK is generated from this sources, the created binary contains the string. The only library, that is used by the SDK is the --> Accounts.framework <-- from IOS itself!
So looks like Apple has shot their own foot!
Edit: Eric gave the correct answer. UIDevice is used in facebook-ios-sdk/src/FBSession.m. The Accounts.framework wasn't the problem.
回答12:
This is all Apple does, all you need to do is:
strings - -a -arch armv7 "App.app/App" | grep uniqueIdentifier
App.app is after you unzip the App.ipa, it will then be inside the payload directory.
Just run that command inside the payload directory. You can do a test by greping a known method you use.
You can substitute armv7 to all if you want to search for all architectures it is built for.
回答13:
I'm facing the same issue today. There is a variable in openssl named uniqueIdentifier. Maybe it causing the problem.
回答14:
I had the same issue. It turned out to be RevMob sdk. The latest 5.9.0 (2013/05/30) seams to fix the issue.
来源:https://stackoverflow.com/questions/16409966/app-rejected-but-i-dont-use-udid