googleads/googleads-mobile-flutter

[iOS]The gma_mediation_applovin plugin fails to compile in XCode

liangbx361 opened this issue · 2 comments

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.6, on macOS 13.6.6 22G630 darwin-x64, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.4)
[✓] VS Code (version 1.88.1)
[✓] VS Code (version 1.90.0-insider)
[✓] Connected device (2 available)
! Error: Browsing on the local area network for bao xian’s iPhone. Ensure
the device is unlocked and attached with a cable or associated with the
same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources

• No issues found!

SDK Version

  • google_mobile_ads: ^5.1.0
  • gma_mediation_applovin: ^1.1.0

Issue Description

Ld /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/gma_mediation_applovin.framework/gma_mediation_applovin normal (in target 'gma_mediation_applovin' from project 'Pods')
cd /Users/lbx/dev/flutter/project/joyreels/ios/Pods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios12.0 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -Os -L/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos -L/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/gma_mediation_applovin -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/usr/lib/swift -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/gma_mediation_applovin -F/Library/flutter_3.16.2/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64 -F/Users/lbx/dev/flutter/project/joyreels/ios/Pods/AppLovinSDK/applovin-ios-sdk-12.4.2 -F/Users/lbx/dev/flutter/project/joyreels/ios/Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework -F/Users/lbx/dev/flutter/project/joyreels/ios/Pods/GoogleMobileAdsMediationAppLovin/AppLovinAdapter-12.4.2.0 -F/Users/lbx/dev/flutter/project/joyreels/ios/Pods/GoogleUserMessagingPlatform/Frameworks/Release -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/AppLovinSDK -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/Google-Mobile-Ads-SDK -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/GoogleMobileAdsMediationAppLovin -F/Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/GoogleUserMessagingPlatform -filelist /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/gma_mediation_applovin.build/Objects-normal/arm64/gma_mediation_applovin.LinkFileList -install_name @rpath/gma_mediation_applovin.framework/gma_mediation_applovin -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/gma_mediation_applovin.build/Objects-normal/arm64/gma_mediation_applovin_lto.o -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/gma_mediation_applovin.build/Objects-normal/arm64/gma_mediation_applovin.swiftmodule -weak_framework AdSupport -weak_framework AppTrackingTransparency -weak_framework JavaScriptCore -weak_framework SafariServices -weak_framework WebKit -framework Flutter -framework Foundation -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/gma_mediation_applovin.build/Objects-normal/arm64/gma_mediation_applovin_dependency_info.dat -o /Users/lbx/Library/Developer/Xcode/DerivedData/Runner-blhoqwrezievircjubfgvcceomat/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/gma_mediation_applovin.framework/gma_mediation_applovin

ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
OBJC_CLASS$_GADMAdapterAppLovinExtras, referenced from:
in AppLovinFlutterMediationExtras.o

Hi @liangbx361 I created a blank project with those two packages installed and could not replicate your issue. I am able to compile and run the iOS project. Can you provide a minimum reproducible sample?

Hi @malandr2 I solved the compilation error by manually adding s.static_framework = true to each mediation SDK iOS module Pod file.