App rejected, but I don't use UDID
Asked Answered
F

14

45

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?

Fishnet answered 7/5, 2013 at 1:46 Comment(5)
Are you using third party libraries or classes that could contain UDIDs?Nimmons
Are you passing anything, maybe something you are constructing, from your App to your servers that identifies the iPhone?Naamann
Maybe some analytics libraries?Limerick
Do you have any other methods in your app called uniqueIdentifier? Sometimes Apple will incorrectly flag private/deprecated selector use even when the selector is not on an Apple-class.Plating
This answer may help you: https://mcmap.net/q/374078/-the-app-references-non-public-selector-in-id-facebook-sdk-ios.Floe
D
86

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

Damson answered 8/5, 2013 at 0:39 Comment(4)
This should be the accepted answer, it cuts through and nails the offending code dead on.Zinciferous
is there any room for false positives? Millennial SDK (v5.0.1) is being thrown, even when they claim it's no longer used.Alienage
Some 3rd party libraries don't use a ".a" extension, and instead use no extension. This command will find API usage in those files as well: grep -lr "uniqueIdentifier" * | grep -v .svn | grep -v .mdWoolsack
Perfect!Must keep it as a sample.Intermarriage
N
7

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 :)

Nomenclature answered 7/5, 2013 at 19:37 Comment(0)
W
5

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.

Woodworth answered 7/5, 2013 at 15:8 Comment(6)
How can I use String command ? I have a xyz.app then ?? I am using $ strings xyz.app | grep uniqueIdentifier and getting can't map file: xyz.app (Invalid argument). ThanksPerithecium
Search for a file with the same name of your app inside the ".app" directory. Assuming my app is called "Foo.app" run "find Foo.app -type f -name Foo", and then run strings against it.Woodworth
@Woodworth - I seem to have the same problem with libspotify. It's not in plaintext anywhere in my source code, so it seems to be inside the libspotify binary. Did you find a solution?Pneumatophore
@Pneumatophore - Send an email to Apple stating you aren't using uniqueIdentifier but libspotify links to OpenSSL which has the string defined.Woodworth
+1 Thanks Igor, But I am still unable to run. I have xyz.app file on desktop and it is not working :(Perithecium
The uniqueIdentifier within openSSL is a preprocessor similar to #define _name "uniqueIdentifier", so it doesn't get compiled into the symbol table for apple to grep after compiling the binary.Expertize
I
3

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.

Iolaiolande answered 7/5, 2013 at 19:24 Comment(1)
Thanks Tomasz for the clarification. Actually the latest version of the plugin is 3.3.1 You can download it and read the release notes here bugsense.com/releases/ios/3.3.1Favourable
S
3

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

Simony answered 7/5, 2013 at 23:38 Comment(0)
D
3

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

Darwindarwinian answered 17/5, 2013 at 13:2 Comment(0)
D
2

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.

Despondency answered 7/5, 2013 at 5:41 Comment(3)
Upgrading the AdMob SDK solved the problem for me. I think you may have an other thrid part library using uniqueIdentifier.Torey
I submitted today the same binary that was rejected some days ago and it has not been rejected. I guess the problem was in the itunes connect side and not in the admob lib.Planchette
I submitted a new version with same AdMob SDK and iTunes connect didn't complain that. I think the problem was in iTunes connect and they already fixed it as others said.Despondency
V
2

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.

Verge answered 7/5, 2013 at 5:42 Comment(0)
O
1

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.

Overdue answered 8/5, 2013 at 10:20 Comment(0)
L
1

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 ?

Limited answered 8/5, 2013 at 23:8 Comment(0)
S
1

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.

Synaeresis answered 15/5, 2013 at 18:32 Comment(0)
E
1

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.

Expertize answered 30/5, 2013 at 15:50 Comment(0)
S
0

I'm facing the same issue today. There is a variable in openssl named uniqueIdentifier. Maybe it causing the problem.

Sago answered 7/5, 2013 at 13:56 Comment(1)
Are you by any chance using libspotify? I found it being the culprit on my submission today.Woodworth
P
0

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.

Parathyroid answered 6/6, 2013 at 20:6 Comment(1)
Hi! this is not an answer, convert it to comment, please.Anamorphism

© 2022 - 2024 — McMap. All rights reserved.