react-native-admob-native-ads
                                
                                
                                
                                    react-native-admob-native-ads copied to clipboard
                            
                            
                            
                        RNAdmobNativeAdsManager.o ld: symbol(s) not found for architecture x86_64 clang
I am currently building a react native project on a M1 Pro chip. I am having issues building the project for any simulator as I get the error below.
Simulator version (12.4) than being linked (9.0) Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GADAdLoader", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o objc-class-ref in RNGADNativeView.o "_OBJC_CLASS_$_GADMultipleAdsAdLoaderOptions", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o "_OBJC_METACLASS_$_GADNativeAdView", referenced from: _OBJC_METACLASS_$_RNGADNativeView in RNGADNativeView.o "_OBJC_CLASS_$_GADCustomEventExtras", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o "_OBJC_CLASS_$_GADNativeAdViewAdOptions", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o objc-class-ref in RNGADNativeView.o "_OBJC_CLASS_$_GADNativeAdMediaAdLoaderOptions", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o objc-class-ref in RNGADNativeView.o "_OBJC_CLASS_$_GADMediaView", referenced from: objc-class-ref in RNGADMediaView.o "_OBJC_CLASS_$_GADVideoOptions", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o objc-class-ref in RNGADNativeView.o "_OBJC_CLASS_$_GAMRequest", referenced from: objc-class-ref in RNAdMobUnifiedAdQueueWrapper.o objc-class-ref in RNGADNativeView.o "_GADAdLoaderAdTypeNative", referenced from: -[RNAdMobUnifiedAdQueueWrapper fillAds] in RNAdMobUnifiedAdQueueWrapper.o -[RNGADNativeView requestAd] in RNGADNativeView.o "_OBJC_CLASS_$_FBAdSettings", referenced from: objc-class-ref in RNAdmobNativeAdsManager.o "_OBJC_CLASS_$_GADExtras", referenced from: objc-class-ref in RNGADNativeView.o "_GADMaxAdContentRatingGeneral", referenced from: -[RNAdmobNativeAdsManager setRequestConfiguration:resolver:rejecter:] in RNAdmobNativeAdsManager.o "_GADSimulatorID", referenced from: -[RNAdmobNativeAdsManager setRequestConfiguration:resolver:rejecter:] in RNAdmobNativeAdsManager.o "_GADMaxAdContentRatingParentalGuidance", referenced from: -[RNAdmobNativeAdsManager setRequestConfiguration:resolver:rejecter:] in RNAdmobNativeAdsManager.o "_OBJC_CLASS_$_GADNativeAdView", referenced from: _OBJC_CLASS_$_RNGADNativeView in RNGADNativeView.o "_OBJC_CLASS_$_GADMobileAds", referenced from: objc-class-ref in RNAdmobNativeAdsManager.o "_OBJC_CLASS_$_GADFBNetworkExtras", referenced from: objc-class-ref in RNGADNativeView.o "_GADMaxAdContentRatingTeen", referenced from: -[RNAdmobNativeAdsManager setRequestConfiguration:resolver:rejecter:] in RNAdmobNativeAdsManager.o "_GADMaxAdContentRatingMatureAudience", referenced from: -[RNAdmobNativeAdsManager setRequestConfiguration:resolver:rejecter:] in RNAdmobNativeAdsManager.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my Podfile
` $RNFirebaseAsStaticFramework = true require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pre_install do |installer|
installer.pod_targets.each do |pod| if pod.name.eql?('RNAdmobNativeAdsManager') || pod.name.start_with?('Admob-') def pod.build_type; # Uncomment one line depending on your CocoaPods version Pod::BuildType.static_library # >= 1.9 # Pod::Target::BuildType.static_library # < 1.9 end end end
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} installer.pod_targets.each do |pod| if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-') def pod.build_type; # Uncomment the line corresponding to your CocoaPods version Pod::BuildType.static_library # >= 1.9 # Pod::Target::BuildType.static_library # < 1.9 end end end end
platform :ios, '13.0' install! 'cocoapods', :deterministic_uuids => false
target 'filmfinder' do inherit! :search_paths config = use_native_modules! use_frameworks!
permissions_path = '../node_modules/react-native-permissions/ios' pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary/Permission-MediaLibrary.podspec" pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications/Permission-Notifications.podspec" pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary/Permission-PhotoLibrary.podspec" pod 'Google-Mobile-Ads-SDK' pod 'GoogleMobileAdsMediationFacebook', '6.11.0.0'
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath], :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], :app_path => "#{Pod::Config.instance.installation_root}/.." )
target 'filmfinderTests' do inherit! :complete end
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' end end react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) end end `
Does anyone know a solution to this?