Unity Xcode build failed with error: Linker command failed with exit code 1 (use -v to see invocation)

60 Views Asked by At

I have build failed Unity project in Xcode with error: "Linker command failed with exit code 1 (use -v to see invocation)". I try to double click on it to get more information, but all i have is still this error.

About my Unity Project: I use GoogleMobileAds package (8.5.0), and Applovin has Google Admob. When build in Unity, i have error:

Analyzing dependencies [!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK": In Podfile: AppLovinMediationGoogleAdapter (= 10.5.0.1) was resolved to 10.5.0.1, which depends on Google-Mobile-Ads-SDK (= 10.5.0)

Google-Mobile-Ads-SDK (~> 10.9)

Specs satisfying the Google-Mobile-Ads-SDK (~> 10.9), Google-Mobile-Ads-SDK (= 10.5.0) dependency were found, but they required a higher minimum deployment target.

I try to upgrade Google Admob to newest version to build but this still has this error, the only difference is version of Google Admob in error. Then i fixed it by change the version of Google Admob in dependencies file to ios 10.9.0.1 (MaxSdk/Mediation/Google/Editor/Dependencies.xml). Then i build success and continue to Xcode build.

Unity version: 2020.3.38f macOS: Sonoma 14.1.1 Cocoapods: 1.15.2

In Xcode, I both enabled Bitcode and disable it, delete input in shell at build phase, create header file, add flag -lxml2 into other Linker flag, but it still have this error. I also try to update cocoapod to newest version. What can i do now to fix this error in XCode? Thanks!!!

0

There are 0 best solutions below