react-native-admob-native-ads
react-native-admob-native-ads copied to clipboard
ld: framework not found FacebookAdapter
not working for react-native 69.4
my pod file
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
# pod 'Google-Mobile-Ads-SDK','9.3.0'
# pod 'GoogleMobileAdsMediationFacebook' ,'6.11.0.0'
production = ENV["PRODUCTION"] == "1"
target 'TrueCaller' do
config = use_native_modules!
use_frameworks!
pre_install do |installer|
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
$RNFirebaseAsStaticFramework = true
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# :flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly"
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationFacebook'
target 'TrueCallerTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
package.json
{
"name": "TrueCaller",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.9",
"@react-native-community/art": "^1.2.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/cookies": "^5.0.1",
"@react-native-community/google-signin": "^5.0.0",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/picker": "^1.8.1",
"@react-native-community/slider": "^4.3.0",
"@react-native-firebase/app": "^15.3.0",
"@react-native-firebase/auth": "^15.3.0",
"@react-navigation/bottom-tabs": "^6.3.2",
"@react-navigation/drawer": "^6.4.3",
"@react-navigation/material-bottom-tabs": "^6.2.2",
"@react-navigation/native": "^6.0.11",
"@react-navigation/stack": "^6.2.2",
"@twotalltotems/react-native-otp-input": "^1.3.11",
"deprecated-react-native-prop-types": "^2.3.0",
"google-libphonenumber": "^3.2.30",
"lottie-react-native": "^5.1.4",
"native-base": "2.15.2",
"react": "18.0.0",
"react-native": "0.69.4",
"react-native-admob-native-ads": "^0.6.0",
"react-native-android-notification-listener": "^5.0.0",
"react-native-android-recyclerview": "^1.0.2",
"react-native-animatable": "^1.3.3",
"react-native-awesome-pin": "^1.3.3",
"react-native-call-detection": "^1.9.0",
"react-native-contacts": "^7.0.5",
"react-native-easy-grid": "^0.2.2",
"react-native-gesture-handler": "^2.5.0",
"react-native-image-crop-picker": "^0.38.0",
"react-native-image-slider-box": "^2.0.4",
"react-native-intent-launcher": "^0.2.1",
"react-native-largelist": "^3.1.0-rc.2",
"react-native-largelist-v3": "^3.1.0-rc.1",
"react-native-linear-gradient": "^2.6.2",
"react-native-material-menu": "^2.0.0",
"react-native-modal": "^13.0.1",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-neomorph-shadows": "^1.1.2",
"react-native-otp-textinput": "^0.0.9",
"react-native-paper": "^4.12.4",
"react-native-permissions": "^3.6.0",
"react-native-ratings": "^8.1.0",
"react-native-reanimated": "^2.9.1",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.15.0",
"react-native-share": "^7.8.0",
"react-native-shared-element": "^0.8.4",
"react-native-shimmer-placeholder": "^2.0.9",
"react-native-splash-screen": "^3.3.0",
"react-native-spring-scrollview": "^3.0.2",
"react-native-svg": "^12.4.4",
"react-native-tracking-transparency": "^0.1.1",
"react-native-vector-icons": "^9.2.0",
"react-native-virtualized-waterfall": "^1.2.3",
"react-navigation-shared-element": "^3.1.3",
"realm": "^10.19.5",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"recyclerlistview": "^4.1.3",
"rn-fetch-blob": "^0.12.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.70.3",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "18.0.0"
},
"jest": {
"preset": "react-native"
}
}
This is because FacebookAdapter has changed to MetaAdapter, but react-native-admob-native-ads hasn't been updated.
I was able to resolve this by hardcoded the version of GoogleMobileAdsMediationFacebook.
pod 'GoogleMobileAdsMediationFacebook', '6.11.0.0'
Doing this creates another error:
GoogleMobileAdsMediationFacebook (= 6.11.0.0) was resolved to 6.11.0.0, which depends on
Google-Mobile-Ads-SDK (~> 9.0)
RNGoogleMobileAds (from `../node_modules/react-native-google-mobile-ads`) was resolved to 10.1.1, which depends on
Google-Mobile-Ads-SDK (= 10.2.0)
Fixed in v0.6.4.