danwilson / google-analytics-plugin

Cordova (PhoneGap) Plugin to connect to the native Google's Universal Analytics SDK 3.0
MIT License
693 stars 500 forks source link

Target has transitive dependencies that include statically linked binaries #592

Closed muuvmuuv closed 2 years ago

muuvmuuv commented 2 years ago

I get this error recently but can't really figure out why. I did no updates nor did i upgrade ruby or cocoapods. Any idea why this is coming now? I am using Capacitor and Ionic both on latest version.

        Installing GoogleAnalytics (3.17.0)
        Installing GoogleIDFASupport (3.14.0)
        [!] The 'Pods-App' target has transitive dependencies that include statically linked binaries:
        (/Users/marvin/Development/__temp/ionic/ios/App/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a and
        /Users/marvin/Development/__temp/ionic/ios/App/Pods/GoogleIDFASupport/Libraries/libAdIdAccessLibrary.a)
media4learning commented 2 years ago

I have the same error. Has anyone found a solution to this? I'm using Capacitor 3 and Ionic 5.x

cyril-colin commented 2 years ago

Same problem here, with same environment. Capacitor 3 seems to delete project "CordovaPluginsStatic"... maybe it is e Capacitor problem ?

cyril-colin commented 2 years ago

By downgrading @capacitor/cli from 3.2.5 to 3.2.4, It works again. I have made an issue for that on Capacitor : https://github.com/ionic-team/capacitor/issues/5219

media4learning commented 2 years ago

I found adding this after the target (at the bottom of the file) in the iOS Podfile worked.

pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} end

muuvmuuv commented 2 years ago

We just got rid of the native implementation and use the gtag istead directly as a script. This also gives us more control of what is tracked and through Capacitor I can also handle native events if needed.

media4learning commented 2 years ago

We just got rid of the native implementation and use the gtag istead directly as a script. This also gives us more control of what is tracked and through Capacitor I can also handle native events if needed.

Out of interest does this work for you on iOS? I tried this but the gtag script is ignored on ios devices -> I found this https://github.com/ionic-team/capacitor/issues/1433 but I ended up just using the native implementation and adding the plugin to the staticplugins array in the cordova object in my capacitor config file.

victorsosa commented 2 years ago

PR #594 created