google-analytics-plugin icon indicating copy to clipboard operation
google-analytics-plugin copied to clipboard

Rejected by Apple "Your app is using the Advertising Identifier (IDFA)."

Open RangerRick opened this issue 9 years ago • 56 comments

I am attempting to submit my Cordova app using this plugin, and when I submit I get this warning from Apple:

Your app is using the Advertising Identifier (IDFA). You must either provide details about the IDFA usage or remove it from the app and submit your binary again.

I have not enabled any IDFA-related collection in my app as far as I can tell, although I do use setUserId. Would that be triggering it or is it purely something about including the Google SDKs?

RangerRick avatar May 05 '16 17:05 RangerRick

Oop, I stand corrected, it was the cordova-plugin-extension, not this one.

RangerRick avatar May 05 '16 18:05 RangerRick

I am now getting rejected by Apple and it is definitely due to this plugin - using version 1.5.3 I can see that libAdIdAccess.a and AdSupport.framework are being added - and this is causing the rejection.

f3cp avatar Aug 08 '16 03:08 f3cp

@f3cp please use the version 1.0.0, it doesn't have the IDFA

victorsosa avatar Aug 08 '16 09:08 victorsosa

@victorsosa Hi there! I've been using this great plugin for a very long time, and I really appreciate your recent efforts to maintain it. Still, I am facing the same issue as @f3cp, and this is a major one. Basically, it means that we can no longer upload apps to the App Store if we want to keep the plugin up-to-date while not displaying any add within the app.

While I will, for now, settle on version 1.0.0, I have trouble imagining being stuck to this very version on the long run.

Since this is a critical issue, what are your plans regarding it? Do you think that you can work toward an option of some sort that would allow us to embed binaries without the IDFA while still benefiting from the latest updates?

bd-arc avatar Aug 09 '16 14:08 bd-arc

@bd-arc I was thinking last weekend on create a branch for this and keep it updated. But this is only affecting IOS and it will be time consuming to keep track on two branches and some user may use IDFA feature.

I hope that you guy help me find another solution to avoid IDFA library inside the plugin or some type of setup.

I found this article about this topic. https://coronalabs.com/blog/2014/06/19/avoiding-app-rejection-from-apple/

victorsosa avatar Aug 09 '16 15:08 victorsosa

Also more that only ads; the demographics data and others features may need this config on, so that is most of the new stuff added to the library since v1.0.0

victorsosa avatar Aug 09 '16 15:08 victorsosa

@victorsosa Thank you for your answer.

I will try to find a solution to this matter, even though I am not very proficient at dealing with native libraries. I assume that even native-only developers are facing this issue, so my hopes are high that we can stumble across a solution.

bd-arc avatar Aug 09 '16 15:08 bd-arc

The same for me..

If your app does not serve ads, please check your code - including any third-party libraries - to remove any instances of:

class: ASIdentifierManager selector: advertisingIdentifier framework: AdSupport.framework

bushev avatar Aug 16 '16 18:08 bushev

@bd-arc and @bushev please try this workaround and let me know if it works:

Go to you project under the plugin folder and in the plugin.xml file comment or remove this line <framework src="AdSupport.framework" />

victorsosa avatar Aug 17 '16 12:08 victorsosa

Just tested this workaround, it did not work! Still rejected by apple.

opbokel avatar Aug 18 '16 16:08 opbokel

Guys from ionic-plugin-deeplinks have introduced a workaround: https://github.com/driftyco/ionic-plugin-deeplinks/commit/394f3f43bdaef9af58b88ae03644a915ae1adbad

bushev avatar Aug 18 '16 16:08 bushev

Same problem here... I will use the 1.0.0 waiting for a workaround. thanks for your work.

Nightbr avatar Sep 07 '16 15:09 Nightbr

Is there a solution for this yet? I'm facing the same problem here.

seme1 avatar Sep 08 '16 01:09 seme1

Thanks @Nightbr , version 1.0.0 is fine and not rejected, hope this gets fixed soon.

alexlopezit avatar Sep 10 '16 05:09 alexlopezit

I'm having the same problem, will downgrade to 1.0.0 as temporary work around, but also would like to see this fixed.

jstradli avatar Sep 19 '16 21:09 jstradli

For the time being, you can remove libAdIdAccess.a and AdSupport.framework in Xcode in the Linked Frameworks and Libraries section. I'm assuming that means you can remove both of these from the plugin.xml file:

<source-file src="ios/libAdIdAccess.a" framework="true" /> <framework src="AdSupport.framework" />

I just removed them in Xcode, and after I resubmitted Apple had no issues.

brandonpassley avatar Sep 20 '16 03:09 brandonpassley

Thank you @brandonpassley , i had the same problem, and with your instructions my app is in review at this moment... Thank you so much

LexBel-co avatar Dec 10 '16 00:12 LexBel-co

Love you @brandonpassley, you saved my day

peterpeterparker avatar Dec 18 '16 20:12 peterpeterparker

@brandonpassley many thanks! I remove this files and I have been able to delete those files and send them to revision by selecting not in IDFA :)

mugan86 avatar Dec 22 '16 11:12 mugan86

Just ran into this issue but none of the options offered make sense for our app:

https://www.dropbox.com/s/4exwljdwoklgz1r/Screenshot%202017-01-25%2015.24.49.png?dl=0

What will removing the stuff @brandonpassley suggested do? Will it break this plugin completely or just cause parts of it to not function?

joshstrange avatar Jan 25 '17 20:01 joshstrange

@joshstrange Everything still works for me after I removed those. However, I'm only using window.ga.startTrackerWithId() and window.ga.trackView(). My guess is that you won't see any issues unless you use window.ga.setAllowIDFACollection().

brandonpassley avatar Jan 25 '17 21:01 brandonpassley

What I did to resolve this (for PhoneGap users), was bring this plugin into the application, instead of making reference to the plugin externally via the config.xml. This allows the plugin code to be modified.

Not being too familiar with plugins, I found an article which stepped me through how to download a GitHub plugin and then store that plugin within the web solution: https://github.com/krisrandall/streaming-media-plugin-demo Just make reference to this GitHub project instead of the streaming media plugin project mentioned in the post. (also don't worry about the last 5 steps of the example...there is no demo project to download from GitHub). You will have the plugin source code at this point anyways.

You should copy the source code for the plugin into the "plugins" folder within your PhoneGap project.

Then I instead of saying this in the config.xml like this: <gap:plugin name="cordova-plugin-google-analytics" />

Make reference to the local plugin in the config.xml using the feature tag:

<feature name="UniversalAnalytics">
<param name="ios-package" value="UniversalAnalyticsPlugin" />
</feature>
<feature name="UniversalAnalytics">
<param name="android-package" value="com.danielcwilson.plugins.analytics.UniversalAnalyticsPlugin" />
</feature>
<feature name="UniversalAnalytics">
<param name="wp-package" value="UniversalAnalyticsPlugin" />
</feature>

Then in the plugins/cordova-plugin-google-analytics-plugin/plugin.xml, comment out the Ad references: source-file src="ios/libAdIdAccess.a" framework="true" framework src="AdSupport.framework"

twbocklertorch avatar Feb 13 '17 14:02 twbocklertorch

Just today I've submitted the app and I got the error in iTunes Connect.

Any updates? Is there any clean way to fix this?

adyz avatar Feb 24 '17 09:02 adyz

@adyz follow the @brandonpassley instructions, that works for me:

"For the time being, you can remove libAdIdAccess.a and AdSupport.framework in Xcode in the Linked Frameworks and Libraries section. I'm assuming that means you can remove both of these from the plugin.xml file:

<source-file src="ios/libAdIdAccess.a" framework="true" /> <framework src="AdSupport.framework" />

I just removed them in Xcode, and after I resubmitted Apple had no issues."

LexBel-co avatar Feb 24 '17 14:02 LexBel-co

I've been experiencing this problem too twice. 😔

To prevent this on the future I've made a gulp task that deletes the references to IDFA on the iOS project, I paste it here. It's not a solution but by now works for me:

gulp.task('idfa', function () {
  //Deletes the library from the iOS project
  del(["./platforms/ios/YOURPROJECT/Plugins/cordova-plugin-google-analytics/libAdIdAccess.a"]);
  
  //Removes any reference to the framework on the project
  gulp.src('./platforms/ios/YOURPROJECT.xcodeproj/project.pbxproj')
    .pipe(rename("project.pbxproj"))
    .pipe(replace(/.*libAdId.*\n/g, ''))
    .pipe(gulp.dest('./platforms/ios/YOURPROJECT.xcodeproj'));
});

Before send to Apple you should check that the advertising identifier is not on your project using this:

grep -r advertisingIdentifier .

davebcn87 avatar Mar 07 '17 09:03 davebcn87

is possible to fix the problem using PhoneGapBuild? I can't find plugin.xml to remove this lines:

<source-file src="ios/libAdIdAccess.a" framework="true" /> 
<framework src="AdSupport.framework" />

purinagripal avatar Mar 08 '17 13:03 purinagripal

@purinagripal : I have trying to figure out if my resolution works or not. One PhoneGap app works, while the other doesn't. But regardless, you'll want to bring the plugin source code into your project, so that you can find the plugin.xml. See my original comment above for how I did this. Let us know if this works or not.

twbocklertorch avatar Mar 08 '17 13:03 twbocklertorch

At moment trying with 1.0.0 version, I let you know when I try your solution.

I usually submit only the www folder to PhoneGapBuild, can I submit the plugin aswell?

purinagripal avatar Mar 08 '17 14:03 purinagripal

Any update on this? I'm automating all my builds so manually editing in xcode isn't really going to work :(

adamiprinciples avatar Mar 29 '17 18:03 adamiprinciples

Same as we do. Any update? We are using Ionic Cordova app

vukdavid avatar Mar 30 '17 09:03 vukdavid