My app was just rejected for using the Ad support framework. Which library is responsible?
Asked Answered
S

9

82

This was simply an update that didn't change anything to do with the rejection reason. Here is the response from the resolution center:

Reasons Program License Agreement PLA 3.3.12

We found your app uses the iOS Advertising Identifier but does not include ad functionality. This does not comply with the terms of the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.

Specifically, section 3.3.12 of the iOS Developer Program License Agreement states:

"You and Your Applications (and any third party with whom you have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier."

Please check your code - including any third-party libraries - to remove any instances of:

class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.framework

If you are planning to incorporate ads in a future version, please remove the Advertising Identifier from your app until you have included ad functionality.

To help locate the Advertising Identifier, use the “nm” tool. For information on the “nm” tool, open a terminal window and enter, “man nm.”

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

The third party libraries I'm using is the latest version of parse.com sdk, latest version of flurry analytics, and version 2.2 of test flight. Does anybody know which library is the issue? Thanks

Sprit answered 31/1, 2014 at 20:7 Comment(15)
IMO they provided a lot of hints to do that search by yourself...did you try and you didn't find it?Muddy
I've seen people having this problem with google analyticsTestudo
I have seen heaps of posts on the net on rejection because of flurry. Did you do any testing yourself, guidelines are accurate in the mail from Apple... probably the culprit is iOS Advertising Identifier cannot be usedIfill
I just have no idea how to do what they recommended.Sprit
Use nm in a terminal window on your app. Just as described by AppleIfill
I have no knowledge of how to use terminalSprit
You can search your project's files in Xcode or you can try removing the AdSupport framework to see what fails at build/run time. To use the terminal, click Spotlight (search) and type Terminal. Wait for it to appear as an Application in the search results. Once in Terminal, type "cd" followed by a space, then drag and drop your Xcode build folder from Finder into Terminal. This should automatically type that folder name in. Hit Enter, and it will change directories (cd) you to that folder. From there, type strings (filename for library) or otool (filename for library).Pteryla
support.flurry.com/index.php?title=Analytics/GettingStarted suggests if you're using Flurry for only analytics, you won't be rejected. It does not require AdSupport.frameworkPteryla
Parse.com requires it. parse.com/questions/i-am-getting-linker-errorPteryla
However, the biggest reason you'd get flagged is TestFlight, for which this ID is essential: testflightapp.com/sdk/ios/doc/2.0.0 - "The AdSupport.framework is required for iOS 6.0+ in order to uniquely identify users so we can estimate the number of users your app has (using ASIdentifierManager). You may weak link the framework in you app. If your app does not link with the AdSupport.framework, the TestFlight SDK will automatically load it for apps running on iOS 6.0+."Pteryla
Turns out the Testflight v2.2.0 was the conflict. They have since fixed it acording to their changelog: Consolidate both SDK versions into one which removes all access to ASIdentifierManagerSprit
Also an issue in the facebook sdk: github.com/facebook/facebook-ios-sdk/issues/583Compelling
If the AdSupport.framework is linked as optional, would that solve the problem with the App Store?Duntson
My app is also rejected with same Error. i am using charboost. can anyone help me?Woolard
Does anyone know the answer to Legoless's question? If the AdSupport.framework is weak linked (optional). And my app doesn't show any ads, will the AppStore still reject the app?Arsphenamine
R
115

In Terminal:

  1. Go to the root folder of your project
  2. Type: grep -r advertisingIdentifier . (the dot at the end is critical)

This will recursively check every file, and give you the name of the offending library.

(in my case, it was Flurry)

Rolf answered 4/2, 2014 at 11:24 Comment(13)
I got hit with the same thing too. libFlurry_4.3.1.a and the libGoogleAnalyticsServices.a both have advertisingIdentifier. Don't know when these will be updated or if there is any work around.Fracas
what are we doing to do about this ? we can't just remove our analytics altogether...Carousel
@Confucianism - thanks for fixing my typo! Sorry about that - copy/paste error :(.Rolf
@LouWeed - when this happens, you have to remove Flurry from your apps, and assume that Flurry is panicking and will provide a new update VERY soon. The downside of using free, 3rdparty analytics is that sometimes they screw-up like this. I've had similar with Flurry, TestFlight, Facebook, Parse, and a few others in the past. It happens. But if you're not paying for the service, you can't much complain :)Rolf
Adam No worries! @LouWeed For the moment no choice I think. Flurry is probably working furiously to fix. For me, I have it in code which creates paid and free from two build targets. I use a preprocessor flag set in Build Settings (both Debug and Production) and use #ifndef around the Flurry import+calls. Then delete it (and AdSupport.framework + ad SDKs) from the Build Phases "Link Binary With Libraries" area. I'm putting it in for review tonight so I'll come back and say if it didn't work! ;)Confucianism
Can confirm that Flurry 4.3.2 doesn't match advertisingIdentifier when using the command above.Orfinger
How can i resolve this issue with Facebook SDK 3.12. My app got rejected.Scenarist
Thanks a lot for this answer. In my case it was testFlight.a .Though I had read it on almost every blog / page thats its testFlight I wanted to be sure that I have resolved the problem. Your answer made this possibleCharlottecharlottenburg
@Orfinger FlurryAds/libFlurryAds_4.4.0.a is still using it. Anyone had that issue fixed?Abrahamsen
@Abrahamsen doesn't FlurryAds require the advertising identifier by design? If you're using Flurry Ads, you have to show Ads - at which point, Apple is happy to accept your app, I thought? (sorry, I'm not using FlurryAds, so I'm guessing here)Rolf
@Rolf you are right, Flurry does use that. It turned out Apple was having a bad day that day. We are using Ads, yet Apple validation kept complaining. Gave up that day. came back the next day and submitted and all went well.Abrahamsen
mine was from pushwoosh library!! what can we do!Xylina
In my case there was several. Some of which I removed but I couldn't remove the latest FBSDKCoreKit. Check out this answer for more info: #30554098Scourings
C
17

Update

Google released Google Analytics Services iOS SDK v3.03c which removes the AdSupport.framework dependency by default.

Full changelog entry for Release Version 3.03c (February 19, 2014): https://developers.google.com/analytics/devguides/collection/ios/changelog

Old Awnser

My problem was with Google Analytics and TestFlight.

For TestFlight I just update the library to the version 2.2.1 (https://www.testflightapp.com/sdk/ios/release_notes/2.2.1/).

But for updating Google Analytics I had to remove the -ObjC flag. But as I use Cocoapods to manage some of third libraries, I couldn't just remove it. So I did the follow:

1 - started updating the libGoogleAnalytics.a to Version 3.03a (February 5, 2014)

2 - then a removed also the AdSupport.framework

3 - added "-force_load\ "${PROJECT_DIR}/Source/Library/GoogleAnalyticsServicesiOS_3.03a"" under "Target --> Build Settings --> Other Linker Flags" (Note that in my project the GoogleAnalytics is inside /Source/Library/ folder, and you have to configure your own)

But as I coudn't remove -ObjC flag I searched for how to use -force_load flag with Cocoapods, then I found two useful links:

1 - https://github.com/CocoaPods/CocoaPods/issues/712

2 - http://www.deanmao.com/2012/12/31/linker-error-using-cocoapods/

To summarize I changed the -ObjC flag for "-force_load $(TARGET_BUILD_DIR)/libPods.a" also under "Target --> Build Settings --> Other Linker Flags"

But again, when I tried to publish my app I got an error telling me that the compiler didn't find libPods.a, so I went to "Target --> Build Settings --> Other Linker Flags --> Release" and change this string $(TARGET_BUILD_DIR) to ${BUILT_PRODUCTS_DIR}.

So my Other Linker Flags became like the image below. Other Linker Flags

Hope to help somebody.

Sorry for my english. =]

Clunk answered 7/2, 2014 at 20:35 Comment(7)
I still can't get my app to build without the AdSupport framework. I get undefined symbol ASIIdentifierManagerPlast
Are you using Google Tag Manager? Because if you are then this solution won't work.Clunk
Not that I know of (what does Tag Manager even do?) It's the combined GA / Tag Manager library file thoughPlast
You could also manually edit the Pods/Pods.xcconfig's OTHER_LDFLAGS directly.Evangelista
Google released Google Analytics Services iOS SDK v3.03c today. I updated my answer. =]Clunk
Guys, I have updated to v3.03c and I didn't add any files for Tag. However, I still cant compile without AdSupport framework. Any idea? thanks.Sudarium
i updated the Google Analytics pod to version 3.0.7 in the podfile (previously unspecified but using 3.0.3). this fixed the issue for me.Polak
C
13

For me, Flurry Analytics and TestFlight were both the problem.

For TestFlight, it's as easy as updating it. The 2.2.1 version won't cause any problem (I checked using strings, as Apple suggest)

For Flurry, there is currently no fix apart from removing Flurry, and contrary to Lou Weed suggestion, even if AdSupport.framework is not linked, your app will be rejected.

Here is Flurry support answer :

"Thank you for reaching out to Flurry. We have recently learned that Apple has rejected some apps it believes are using the Identifier for Advertising (IDFA) without including ad functionality. Please note that Flurry does not collect the IDFA unless an app includes the AdSupport.framework for ad functionality. We are seeking clarification with Apple and we will update our affected customers as we learn more over the next several days."

Flurry just released the version 4.3.2 of their SDK, which specifically address that problem.

Carboxylase answered 7/2, 2014 at 9:59 Comment(0)
S
4

Turns out the Testflight v2.2.0 was the conflict. They have since fixed it according to their changelog: Consolidate both SDK versions into one which removes all access to ASIdentifierManager

Sprit answered 4/2, 2014 at 22:13 Comment(0)
S
4

Crashlytics was the problem. We had a few apps rejected because of it. But I already talked with Crashlytics and they released a new update today (version 2.1.6) which fix this issue.

Several libraries have the AdSupport.framework but they do not use it unless specifically called. Crashlytics was calling the framework because it had to check if the app had support for ads. And that change was implemented on version 2.1.5

So if you are using crashlytics, that's the most probable reason. To fix that, just re-archive your app so crashlytics can use the new version with this fix.

Response from Crashlytics Team: "We just pushed out an update for this- can you build and run your app again with the Mac app open so it can update your SDK? You'll be all good to go after that! Keep me posted after you resubmit :)"

PS: This is starting to happen because Apple seem to have changed their policy for ADSupport usage.

Salpingitis answered 6/2, 2014 at 23:7 Comment(0)
P
3

I'd previously written the following in comments, directing people to the "strings" or "otool" terminal commands. However, I really like the suggested answer of using grep. So you can try it first. My suggestion is to prepend "git" to that command, because it's so much faster:

git grep advertisingIdentifier

If that doesn't work, then try (as posted earlier):

grep -r advertisingIdentifier . 

What follows is what I'd previously written in a comment above, as a how-to for terminal commands:

You can search your project's files in Xcode or you can try removing the AdSupport framework to see what fails at build/run time.

To use the terminal, click Spotlight (search) and type Terminal. Wait for it to appear as an Application in the search results.

Once in Terminal, type "cd" followed by a space, then drag and drop your Xcode build folder from Finder into Terminal. This should automatically type that folder name in. Hit Enter, and it will change directories (cd) you to that folder.

From there, type strings then a space, then the filename for your library or otool, a space and the filename for library. You should be able to hit TAB to auto-complete filenames.

Pteryla answered 18/9, 2014 at 17:11 Comment(0)
T
1

My app was also rejected with the same error! I found an occurrence of advertisingIdentifier in the latest Facebook SDK (3.12). Maybe you can check your library's for an occurence with the method below:

I opened the FacebookSDK.framework as a library in the terminal and typed the following command

otool -v -s __TEXT __objc_methname FacebookSDK | grep advertisingIdentifier

But I don't know what to do. Was my app rejected because of this reference? If yes what to do if I want to use facebook functionalities in my app?

Treasurer answered 4/2, 2014 at 15:5 Comment(4)
Here, this should help - #21575180Craft
Thank you for the answer! I made the changes and re-submitted my app, hope it won't be rejected again :)Treasurer
@Treasurer - was your app approved by Apple after making the above changes?Whopping
Yes, it was approved!Treasurer
T
1

This is a bit more complicated than it seems on the surface. After some experimentation I found that the AdSupport Framework is linked even if only directly accessing classes that are referenced in the AdSupport Framework. Ironically, [AsIdentifierManager class], which is used in a lot of third-party libraries to check whether or not the AdSupport Framework has been linked, will actually cause the AdSupport Framework to be linked. Obfuscating the class by using NSClassFromString(@"AsIdentfierManager") will not cause the AdSupport framework to be automatically linked. Of course, most of the time this code will be in third-party libraries so you won't have much control over it, however, this is what's going on.

I built an example project on GitHub that illustrates this behavior using Segment.io's framework. https://github.com/distefam/AdSupportDemo

Tiros answered 6/8, 2014 at 16:48 Comment(1)
Thanks for the useful post. So when we weak link (optional) a framework to the project (in my case it's the Google ad framework called "GoogleInteractiveMediaAds") which has AdSupport.framework inside it, when I submit my app, even though my app doesn't show any ads (have a paid version which doesn't show any ads at all), will it be rejected by Apple??Arsphenamine
C
0

Flurry Analytics uses this API as well.
Terminal output:

Binary file ./Lib/Flurry/libFlurry_4.3.0.a matches

Flurry says that the selector is not called if AdSupport framework isn't linked.
So I removed the framework and tried submitting again.

Carousel answered 6/2, 2014 at 21:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.