appodeal / Appodeal-Flutter-Plugin

Official Flutter Plugin that adds Appodeal SDK support to your Flutter application.
https://pub.dev/packages/stack_appodeal_flutter
Apache License 2.0
18 stars 3 forks source link

Compile error on IOS (Undefined symbols for architecture arm64) #7

Closed radomir9720 closed 2 years ago

radomir9720 commented 2 years ago

Hi.

I cannot compile app on ios.

I just followed the instructions on pub.dev.

plugin version: stack_appodeal_flutter: ^1.1.0

My Podfile # Uncomment this line to define a global platform for your project platform :ios, '10.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, } def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) flutter_ios_podfile_setup def appodeal pod 'APDAdColonyAdapter', '2.11.1.2' pod 'APDAmazonAdsAdapter', '2.11.1.2' pod 'APDAppLovinAdapter', '2.11.1.2' pod 'APDBidMachineAdapter', '2.11.1.2' # Required pod 'APDFacebookAudienceAdapter', '2.11.1.2' pod 'APDGoogleAdMobAdapter', '2.11.1.2' pod 'APDIronSourceAdapter', '2.11.1.2' pod 'APDMyTargetAdapter', '2.11.1.2' pod 'APDOguryAdapter', '2.11.1.1' pod 'APDUnityAdapter', '2.11.1.1' pod 'APDVungleAdapter', '2.11.1.2' pod 'APDYandexAdapter', '2.11.1.1' end target 'Runner' do use_frameworks! use_modular_headers! appodeal flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end

After pod install i get a lot of warnings(don't know if this is important). I tried a lot of suggestions from SO, but nothing worked.

pod install warnings [!] Can't merge user_target_xcconfig for pod targets: ["APDMyTargetAdapter", "IronSourceSDK", "OguryAds", "OMID", "YandexMobileAds", "Static"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphoneos*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphonesimulator*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["APDMyTargetAdapter", "IronSourceSDK", "OguryAds", "OMID", "YandexMobileAds", "Static"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphoneos*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphonesimulator*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["APDMyTargetAdapter", "IronSourceSDK", "OguryAds", "OMID", "YandexMobileAds", "Static"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphoneos*] has different values. [!] Can't merge user_target_xcconfig for pod targets: ["BDMAdColonyAdapter", "BDMAmazonAdapter", "BDMCriteoAdapter", "BDMFacebookAdapter", "BDMIABAdapter", "IAB", "MRAID", "NAST", "VAST", "BDMMyTargetAdapter", "BDMPangleAdapter", "BidMachine", "Core", "StackAnalytics", "Base", "Crashes", "Full", "StackConsentManager", "StackModules", "StackFoundation", "StackProductPresentation", "StackUIKit", "myTrackerSDK"]. Singular build setting VALID_ARCHS[sdk=iphonesimulator*] has different values.
Compiling error ld: warning: Could not find or use auto-linked library 'swiftFileProvider' ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency' ld: warning: Could not find or use auto-linked library 'swift_Concurrency' ld: warning: Could not find or use auto-linked library 'swiftDataDetection' ld: warning: Could not find or use auto-linked framework 'AVFAudio' ld: warning: Could not find or use auto-linked framework 'DataDetection' Undefined symbols for architecture arm64: "__swift_FORCE_LOAD_$_swiftDataDetection", referenced from: __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyVideoAdapter.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyAdNetwork.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(APDAdColonyAppOptions.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyApi.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonNetwork.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonInterstitialAdapter.o) __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonBannerAdapter.o) ... (maybe you meant: __swift_FORCE_LOAD_$_swiftDataDetection_$_APDIronSourceAdapter, __swift_FORCE_LOAD_$_swiftDataDetection_$_APDOguryAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAppLovinAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_StackProductPresentation , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAdColonyAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_FBAudienceNetwork , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDAmazonAdsAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDBidMachineAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDUnityAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDYandexAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDVungleAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDFacebookAudienceAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDMyTargetAdapter , __swift_FORCE_LOAD_$_swiftDataDetection_$_APDGoogleAdMobAdapter ) "_OBJC_CLASS_$_SKAdImpression", referenced from: objc-class-ref in AdColony(ADCAdSession.o) objc-class-ref in AppLovinSDK(ALStoreKitService.o) objc-class-ref in FBAudienceNetwork(FBAdSKAdNetworkManager.m.o) objc-class-ref in MyTargetSDK(MTRGSkadParser.o) objc-class-ref in YandexMobileAds(YMASKAdImpressionFactory.o) (maybe you meant: _OBJC_CLASS_$_SKAdImpressionProxy) "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from: __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyVideoAdapter.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyAdNetwork.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(APDAdColonyAppOptions.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyApi.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonNetwork.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonInterstitialAdapter.o) __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonBannerAdapter.o) ... (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDFacebookAudienceAdapter, __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAdColonyAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAmazonAdsAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_StackProductPresentation , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDVungleAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDGoogleAdMobAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDBidMachineAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDMyTargetAdapter , __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_APDAppLovinAdapter ) "__swift_FORCE_LOAD_$_swiftFileProvider", referenced from: __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyVideoAdapter.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyAdNetwork.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(APDAdColonyAppOptions.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAdColonyAdapter in libAPDAdColonyAdapter.a(AdColonyApi.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonNetwork.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonInterstitialAdapter.o) __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAmazonAdsAdapter in libAPDAmazonAdsAdapter.a(AmazonBannerAdapter.o) ... (maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_StackProductPresentation, __swift_FORCE_LOAD_$_swiftFileProvider_$_APDVungleAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_FBAudienceNetwork , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDMyTargetAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAdColonyAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDFacebookAudienceAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDYandexAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAppLovinAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDAmazonAdsAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDBidMachineAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDOguryAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDIronSourceAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDUnityAdapter , __swift_FORCE_LOAD_$_swiftFileProvider_$_APDGoogleAdMobAdapter ) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I also did one thing that is absent in instruction for IOS on pub.dev: i added SKAdNetworkItems in my info.plist because i found this step on instruction on your site(don't know if this is important). Did I do everything right, or should I not add it?

flutter doctor -v [✓] Flutter (Channel stable, 2.10.3, on Mac OS X 10.15.7 19H2 darwin-x64, locale ru-RU) • Flutter version 2.10.3 at /Users/radomir/development/flutter/2.0 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7e9793dee1 (3 days ago), 2022-03-02 11:23:12 -0600 • Engine revision bd539267b4 • Dart version 2.16.1 • DevTools version 2.9.2 [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/radomir/Library/Android/sdk • Platform android-31, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer ! Flutter recommends a minimum Xcode version of 13. Download the latest version or update via the Mac App Store. • CocoaPods version 1.11.2 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe.sh) ! /Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe.sh is not executable. [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] VS Code (version 1.64.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.36.0 [✓] Connected device (2 available)

UPD: i found on your site that is required to use XCode 13 or later. I use 12.4. Could it be the problem?

da2gl commented 2 years ago

@radomir9720 Hello!

i found on your site that is required to use XCode 13 or later. I use 12.4. Could it be the problem?

yes, it's possible

radomir9720 commented 2 years ago

Ok, I'll try to update, then I'll tell you if it worked.

radomir9720 commented 2 years ago

No error after update to XCode 13. Closing this issue.