danielsogl / awesome-cordova-plugins

Native features for mobile apps built with Cordova/PhoneGap and open web technologies. Complete with TypeScript support.
https://danielsogl.gitbook.io/awesome-cordova-plugins/
Other
2.41k stars 2.42k forks source link

The 'Pods-App' target has transitive dependencies that include statically linked binaries: #3875

Closed KBRR11 closed 2 years ago

KBRR11 commented 2 years ago

I have CocoaPods 1.11.2 and i get this issue:

capacitor sync ios
[capacitor] ✔ Copying web assets from www to ios/App/App/public in 1.31s
[capacitor] ✔ Creating capacitor.config.json in ios/App/App in 946.80μp
[capacitor] [info] Found 10 Cordova plugins for ios:
[capacitor]        cordova-plugin-apprate@1.7.2
[capacitor]        cordova-plugin-dialogs@2.0.2
[capacitor]        cordova-plugin-globalization@1.11.0
[capacitor]        cordova-plugin-inappbrowser@4.1.0
[capacitor]        cordova-plugin-nativestorage@2.3.2
[capacitor]        cordova-plugin-x-socialsharing@5.6.8
[capacitor]        cordova-sqlite-storage@5.1.0
[capacitor]        cordova-uxcam@3.4.3
[capacitor]        es6-promise-plugin@4.2.2
[capacitor]        onesignal-cordova-plugin@2.11.4
[capacitor] ✔ copy ios in 1.42s
[capacitor] ✔ Updating iOS plugins in 36.93ms
[capacitor] [info] Found 9 Capacitor plugins for ios:
[capacitor]        @capacitor-community/apple-sign-in@1.0.1
[capacitor]        @capacitor-community/facebook-login@3.1.1
[capacitor]        @capacitor-community/firebase-analytics@1.0.0
[capacitor]        @capacitor/app@1.0.3
[capacitor]        @capacitor/device@1.0.3
[capacitor]        @capacitor/geolocation@1.1.0
[capacitor]        @capacitor/keyboard@1.0.3
[capacitor]        @codetrix-studio/capacitor-google-auth@3.0.2
[capacitor]        appsflyer-capacitor-plugin@6.4.0
[capacitor] [info] Found 10 Cordova plugins for ios:
[capacitor]        cordova-plugin-apprate@1.7.2
[capacitor]        cordova-plugin-dialogs@2.0.2
[capacitor]        cordova-plugin-globalization@1.11.0
[capacitor]        cordova-plugin-inappbrowser@4.1.0
[capacitor]        cordova-plugin-nativestorage@2.3.2
[capacitor]        cordova-plugin-x-socialsharing@5.6.8
[capacitor]        cordova-sqlite-storage@5.1.0
[capacitor]        cordova-uxcam@3.4.3
[capacitor]        es6-promise-plugin@4.2.2
[capacitor]        onesignal-cordova-plugin@2.11.4
[capacitor] ✖ Updating iOS native dependencies with pod install - failed!
[capacitor] ✖ update ios - failed!
[capacitor] [error] Analyzing dependencies
[capacitor]         AppsflyerCapacitorPlugin: Using AppsFlyerFramework/Strict mode
[capacitor]         Downloading dependencies
[capacitor]         Installing CordovaPlugins (3.3.2)
[capacitor]         Installing CordovaPluginsResources (0.0.105)
[capacitor]         Installing OneSignal (2.16.5)
[capacitor]         [!] The 'Pods-App' target has transitive dependencies that include statically linked binaries: (/Users/mac/Desktop/Front_App/ios/App/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework)
[capacitor]         
[ERROR] An error occurred while running subprocess capacitor.

        capacitor sync ios exited with exit code 1.

        Re-running this command with the --verbose flag may provide more
        information.

before I had no problems with doing npx or ionic capacitor sync, but my Mac had problems and I reset it, I don't know if the Cocoapods version has something to do or something like that

kensodemann commented 2 years ago

What version of Capacitor are you using? Specifically @capacitor/core and @capacitor/cli? Make sure you are on @latest (currently 3.3.2).

If this is still an issue on @latest then check out the staticPlugins config here: https://capacitorjs.com/docs/config

KBRR11 commented 2 years ago

I solved it by updating to the latest capacitor version: 3.3.2 and updating my Onesignal versions:

"@ ionic-native / onesignal": "^ 5.36.0",
"onesignal-cordova-plugin": "^ 2.11.4",

in the latest version of Capacitor you can add any plugin you want to the static list from the config file. Use the staticPlugins array inside the cordova object https://capacitorjs.com/docs/config

my capacitor.config.json looked like this:

{
    "appId": "YOUR APP ID",
    "appName": "YOUR APP NAME",
    "bundledWebRuntime": false,
    "npmClient": "npm",
    "webDir": "www",
    "android": {
        "allowMixedContent": true
    },
    "plugins": {
        "SplashScreen": {
            "launchShowDuration": 3000
        },
        "cordova": {
        "staticPlugins": [
            "onesignal-cordova-plugin"
        ]
    }