google-analytics-plugin: Rejected by Apple "Your app is using the Advertising Identifier (IDFA)."
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?
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 9
- Comments: 56 (1 by maintainers)
Commits related to this issue
- Pin analytics plugin version to avoid IDFA issue. https://github.com/danwilson/google-analytics-plugin/issues/218 — committed to CUUATS/bikemoves-legacy by deleted user 8 years ago
- comment out: <source-file src="ios/libAdIdAccess.a" framework="true" /> <framework src="AdSupport.framework" /> This should remove the IDFA check complaint from apple see https://github.com/danwils... — committed to SebastianSchirmer/google-analytics-plugin by SebastianSchirmer 7 years ago
- dial back google analytics plugin to 1.0.0 to avoid IDFA bug https://github.com/danwilson/google-analytics-plugin/issues/218 — committed to Hesperian/hesperian-mhealth-pregnancy-warning-signs by mlitwin 7 years ago
- #218: Remove IDFA requirement in iOS — committed to webapps-ch/google-analytics-plugin by deleted user 7 years ago
- Disable IDFA https://github.com/danwilson/google-analytics-plugin/issues/218 — committed to 7digital/google-analytics-plugin by deleted user 7 years ago
- Removing plugin dependance on AdSupport framework and library per discussion here: https://github.com/danwilson/google-analytics-plugin/issues/218 — committed to treavg/google-analytics-plugin by deleted user 7 years ago
- Adds removeAdFramework script to fix Google Analytics IDFA porblem (cf. https://github.com/danwilson/google-analytics-plugin/issues/218) — committed to Vliller/vliller by alexbonhomme 7 years ago
- Remove ad framework references from plugin.xml For submission without IDFA https://github.com/danwilson/google-analytics-plugin/issues/218#issuecomment-248194925 — committed to NextFaze/cordova-plugin-google-analytics by zbarbuto 6 years ago
- Removed IDFA framework for App Store Submission Considering PGB does not support cordova hooks... See https://github.com/danwilson/google-analytics-plugin/issues/218 — committed to jlchereau/google-analytics-plugin by jlchereau 6 years ago
- Update plugin.xml Alteração para remover referências que afetavam a detecção de uso do IDFA pela Apple ao submeter uma revisão. Referência: https://github.com/danwilson/google-analytics-plugin/issues... — committed to MobileFacil/google-analytics-plugin-1 by mobile-facil-informatica 6 years ago
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.
I have created a Cordova Hook to do the edits to this plugin. This Cordova Hook (script) removes “AdSupport.framework” and “libAdIdAccess” references from the plugin.xml, as well as removes it from references found in the corresponding node_module and .project.pbxproj. I have stored it in a Gist. https://gist.github.com/SteveKennedy/7edbe6e5f54d8582a27acbfd8d704c12.
I would attach the Hook to after_plugin_add or before_prepare. I am not sure what the right one is. Here’s the whole list https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/. You can add this hook into your Config.xml like so (as an example):
<hook src="scripts/removeAdFramework.js" type="before_prepare" />I think I’ve commented the code well enough for most people to make sense of what’s happening. I have done some basic testing, and it seems to work. Any suggested edits would be appreciated.
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.
I’m having the same problem, will downgrade to 1.0.0 as temporary work around, but also would like to see this fixed.
@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?
Quoting @brandonpassley 's answer:
This worked for me. However, because I’m building on a CI environment with no access to Xcode UI, there were some traces for the 2 libs in the
.pbxprojfile that also need to be removed manually. The below bash script will remove them all:I’ve found a straight forward solution that works without publishing fork-packages on npm and allows to use the latest and greatest version of this plugin.
Simply create a fork here on github. Clone the fork, create a new branch
no-idfaand add a commit similar to this one: https://github.com/hettiger/google-analytics-plugin/commit/90a1d5b68a436656590f69653fbd33456aedfc37Push your changes and use your fork as cordova plugin source.
In your app’s
config.xmlyou can reference your fork directly:I have just submitted my app for review successfully using this procedure and it works flawlessly. (Also tested that the tracked events occur in analytics ofc.)
@SteveKennedy Great job… The code’s absolutely beautiful! Thank you! About the hook, I think attaching it to after_build would be more appropriate. Also, just to be safe, it can be added to
<platform name="ios">section of config.xml file.@joshstrange Thanks for sharing this. That is true and it works but I really do not feel comfortable pushing an app to production after I’ve manually deleted some lines from the xcode project file. @treavg Thanks a lot for the change. Is there a PR for you commit?
I have just setup automated builds for my app but currently am only submitting to Testflight and I think on my other app I only saw this when submitting to the actual store. For others who are automating I suggest you look into writing cordova hooks that edit your project.pbxproj file which is what I have done in the past. I have not done this for this specific issue but a quick search through my pbxproj file I see “AdSupport.framework” mentioned a few times and I’d bet money I could just delete those lines (via a hook) and I’d be good to go. When I get to that point I will reply here with the hook that I write. Until then hopefully this helps steer someone in the right direction.
I always check “Yes”, even if not necessarily using IDFA features, and tell that this is used to track installations from a given campaign/ad. This is not wrong, though, as we do some campaigns/ads. There is nothing wrong with that, most of the apps do that kind of data/stats collection.
I have the same issue, but I just selected the bottom option out of the 3 options they asked. Hopefully there is a better fix for it soon
@joshstrange Everything still works for me after I removed those. However, I’m only using
window.ga.startTrackerWithId()andwindow.ga.trackView(). My guess is that you won’t see any issues unless you usewindow.ga.setAllowIDFACollection().This is a valid use case in a popular plugin yet the issue has been open for roughly two years. I’m just not sure how this is acceptable 😕
thanks!
@SteveKennedy That worked, thank you!
I believe I was able to get past Apple’s review by selecting only the “Limit Add Tracking setting in iOS” box
I’m hoping that no add tracking is used by this plugin when I don’t call window.ga.setAllowIDFACollection(true);
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:
Before send to Apple you should check that the advertising identifier is not on your project using this: