When I try to compile the library folders cannot be found.
Occurs both via npm and xcode.
I initialised a new project with rn 0.60.0, added my Podfile and Deps. Also I added the workaround for Firebase via react-native.config.js
What I tried to fix was:
Pod deintegrate / setup / install
Delete node_modues / npm install
Delete all caches, clean Xcode, delete DerivedData
Check Library Search Path (is $(inherited))
Remove/add Libraries
Follow: ‘ld: warning: directory not found for option’, library not found for -lDoubleConversion ,
Error: ld: library not found for -lPods with CocoaPods
Podfile:
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'pasioapp' do
# Pods for pasioapp
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FirebaseAnalytics'
pod 'Firebase/Invites'
#use_frameworks!
use_native_modules!
end
package.json:
{
"name": "pasioapp",
"version": "0.1.10",
"private": true,
"scripts": {
"start": "react-native start",
"test": "jest",
"list": "eslint.",
"ios": "react-native run-ios",
"i": "react-native run-ios",
"android": "react-native run-android",
"a": "react-native run-android"
},
"dependencies": {
"#firebase/app-types": "^0.4.0",
"#firebase/util": "^0.2.20",
"#fortawesome/fontawesome-svg-core": "^1.2.19",
"#fortawesome/free-regular-svg-icons": "^5.9.0",
"#fortawesome/free-solid-svg-icons": "^5.9.0",
"#fortawesome/react-fontawesome": "^0.1.4",
"#react-native-community/async-storage": "^1.5.0",
"AsyncStorage": "^0.1.5",
"acorn": "^6.1.1",
"core-js": "3",
"events": "^3.0.0",
"firebase": "^6.2.4",
"firebase-admin": "^7.4.0",
"firebase-functions": "^2.3.1",
"hashmap": "^2.3.0",
"npm": "^6.9.2",
"prop-types": "^15.5.10",
"react": "^16.8.6",
"react-native": "^0.60.0",
"react-native-device-info": "^2.1.3",
"react-native-elements": "^1.1.0",
"react-native-firebase": "^5.5.3",
"react-native-htmlview": "^0.14.0",
"react-native-image-picker": "^0.28.1",
"react-native-keychain": "^3.1.3",
"react-native-markdown-renderer": "^3.2.8",
"react-native-navigation": "^2.22.3",
"react-native-parsed-text": "0.0.21",
"react-native-rss-parser": "^1.3.0",
"react-native-snap-carousel": "^3.8.0",
"react-native-tag-input": "0.0.21",
"react-native-testfairy": "^2.18.2",
"react-native-vector-icons": "^6.5.0",
"react-native-webview": "^5.12.0",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"tslint": "^5.18.0",
"typescript": "^3.5.2"
},
"devDependencies": {
"#babel/core": "^7.4.5",
"#babel/runtime": "^7.4.5",
"#react-native-community/eslint-config": "^0.0.3",
"babel-jest": "^24.8.0",
"eslint": "^5.15.3",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.53.1",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}
Result:
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/DoubleConversion'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseAuth'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseDatabase'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseDynamicLinks'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseInstanceID'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/FirebaseStorage'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/Folly'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/GTMOAuth2'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/GoogleAPIClientForREST'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/RNCAsyncStorage'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/RNDeviceInfo'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/RNFirebase'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/RNKeychain'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/RNVectorIcons'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-Core'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-DevSupport'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTActionSheet'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTAnimation'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTBlob'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTImage'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTLinking'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTNetwork'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTSettings'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTText'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTVibration'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-RCTWebSocket'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-cxxreact'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-fishhook'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-jsi'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-jsiexecutor'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/React-jsinspector'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/ReactNativeNavigation'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/glog'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/leveldb-library'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/nanopb'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/react-native-image-picker'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/react-native-webview'
ld: warning: directory not found for option '-L/Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Products/Debug-iphonesimulator/yoga'
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Intermediates.noindex/pasioapp.build/Debug-iphonesimulator/pasioapp.build/Objects-normal/x86_64/pasioapp normal x86_64
Ld /Users/nerdy/Workspace/pasioRN60/pasioapp/ios/build/pasioapp/Build/Intermediates.noindex/pasioapp.build/Debug-iphonesimulator/pasioapp.build/Objects-normal/i386/pasioapp normal i386
(2 failures)
thanks for your help!
Please check the supporting iOS SDK version with the firebase and set the minimum deployment target to that supporting version.
Related
i have battling with this error for days now, trying to start up at a new job. Having issues while trying to run pod install on a react native cli project, i have tried every possible solution on here, doesnt work with mine.
The errors:
[!] Invalid `Podfile` file: /Users/decagon/kumoafrica/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:39: syntax error, unexpected <<
template =<<~EOS
^
/Users/decagon/kumoafrica/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:40: unknown regexp options - ll
/Users/decagon/kumoafrica/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: dynamic constant assignment
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^
/Users/decagon/kumoafrica/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: `$(' is not allowed as a global variable name
/Users/decagon/kumoafrica/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:41: syntax error, unexpected end-of-input
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
^.
# from /Users/decagon/kumoafrica/ios/Podfile:1
# -------------------------------------------
> require_relative '../node_modules/react-native/scripts/react_native_pods'
# require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
# -------------------------------------------
The podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false
target 'kumo' do
config = use_native_modules!
# 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
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'kumoTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
package.json:
{
"name": "kumo",
"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 . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"react": "17.0.2",
"react-native": "0.68.1"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"#types/jest": "^26.0.23",
"#types/react-native": "^0.67.3",
"#types/react-test-renderer": "^17.0.1",
"#typescript-eslint/eslint-plugin": "^5.17.0",
"#typescript-eslint/parser": "^5.17.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.67.0",
"react-test-renderer": "17.0.2",
"typescript": "^4.4.4"
},
"resolutions": {
"#types/react": "^17"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}
if anything else is needed ask, please help.
Don't know if this is helpful now but if you're running React Native from scratch on a M1 Chip machine I was able to fix this issue by doing:
cd ios
bundle install
bundle exec pod install
After hours of struggle this was the way to actually make for pod install work for me.
This same example can be found here: https://reactnative.dev/docs/environment-setup under the "Creating a new application" section.
I think you are Mac M1 user, so follow this steps :
Uninstall the local cocoapods gem
sudo gem uninstall cocoapods
install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
or
Go to Site Web
Finally install cocoapods via Homebrew
brew install cocoapods
And it will Work, Otherwise check this
I'm getting to ios folder and use "pod install" command.
And error below
[!] Invalid `Podfile` file: cannot load such file -- /Users/blabla/works/blabla-app/node_modules/react-native/scripts/react_native_pods.
from /Users/blabla/works/blabla-app/ios/Podfile:2
-------------------------------------------
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
-------------------------------------------
I removed node_modules folder, I deleted package-lock.json and used "npm install" command. I deleted cocoapods and reinstall.
And nothing worked for me.
My package.json file is below (only packages not all)
"#codler/react-native-keyboard-aware-scroll-view": "^1.0.1",
"axios": "^0.19.0",
"entities": "^2.1.0",
"expo": "^38.0.8",
"expo-cli": "^3.28.5",
"native-base": "github:Healthyco/NativeBase#feature/fix-request-animation",
"native-base-autocomplete": "^1.3.2",
"prop-types": "^15.7.2",
"react": "16.9.0",
"react-native": "0.62.0",
"react-native-camera": "^3.40.0",
"react-native-camera-hooks": "^0.3.1",
"react-native-chart-kit": "^6.7.0",
"react-native-daterange-picker": "^1.4.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-keyboard-aware-scroll-view": "https://github.com/APSL/react-native-keyboard-aware-scroll-view#fb40649a9c84aa23d6a55355e9e0e432795967a6",
"react-native-keyboard-aware-scrollview": "^2.1.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-masked-text": "^1.13.0",
"react-native-modal": "^11.5.6",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "^2.7.0",
"react-native-svg": "^12.1.0",
"react-native-swipe-list-view": "^3.2.5",
"react-native-vector-icons": "^7.1.0",
"react-navigation": "^3.11.2",
"react-redux": "^7.2.0",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-saga": "^1.0.2",
"reduxsauce": "^1.0.1",
"victory-native": "^35.3.1"
my podfile:
I remembered that, I downgraded from react 63.2 to 62.0
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '10.0'
target 'blabla' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'blablaTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'blabla-tvOS' do
# Pods for [YourProjectName]-tvOS
target 'blabla-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
You are likely missing the react-native npm module.
You should include it in your packages.json to reduce the likelihood of encountering this error in the future, by using this command.
$ npm install --save react-native
What worked for me whas deleting the ios directory and then running the build command again, i.e.:
rm -rf ios
eas build -p ios
(or whatever build command you are using)
I am using #react-native-firebase/admob for displaying add on app. It is working fine in Android but when I am using it on ios then app is crash with following error.
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator'
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
-[APMMeasurement reportFirstOpenOnWorkerQueue] in GoogleAppMeasurement(APMMeasurement_d6638b533a7cdc437824cf7209ad695a.o)
-[APMSqliteStore prepareSQL:error:] in GoogleAppMeasurement(APMSqliteStore_acc99dfbcd8c054676308fb24061e3f7.o)
+[APMASIdentifierWrapper iOS14OrAbove] in GoogleAppMeasurement(APMASIdentifierWrapper_1d59db0ddd97263057318367c9cd40e6.o)
-[APMIdentity supportsAppTrackingConsentStatus] in GoogleAppMeasurement(APMIdentity_ba0d5d0b5e35834ab5a7bf0571075715.o)
-[APMMeasurement(URL) sendDeepLinkURLToAppDelegateOnMainThread:extraInfo:] in GoogleAppMeasurement(APMMeasurement+URL_89002570063d654e31cbed7a49d52cf9.o)
l002 in GoogleMobileAds(GADAugmentedRealitySignalSource.o)
_GADWindowSceneForViewController in GoogleMobileAds(GADScene.o)
...
ld: symbol(s) not found for architecture x86_64
clang:
error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/admin/Library/Developer/Xcode/DerivedData/adMob-govjzfsolrnouaecgeggequoemrv/Build/Products/Debug-iphonesimulator/adMob.app/adMob normal x86_64
(1 failure)
adMob is my project name.I followed all the instruction to install it.
package.json
{
"name": "adMob",
"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-firebase/admob": "^7.6.5",
"#react-native-firebase/app": "^8.4.3",
"react": "16.13.1",
"react-native": "0.63.2"
},
"devDependencies": {
"#babel/core": "7.11.6",
"#babel/runtime": "7.11.2",
"#react-native-community/eslint-config": "1.1.0",
"babel-jest": "25.5.1",
"eslint": "6.8.0",
"jest": "25.5.4",
"metro-react-native-babel-preset": "0.59.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'adMob' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'RNFBAdMob', :path => '../node_modules/#react-native-firebase/admob'
target 'adMobTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'adMob-tvOS' do
# Pods for adMob-tvOS
target 'adMob-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I also added firebase.json file in root folder
After I did RND and I found that it was the Xcode version issue. I am using Xcode 10 and it is working on Xcode 11 and higher version. So that's why I am facing this issue.
Yes definitely. If you not get ads only archive. then it is mostly permission issue. You should also check google ad mod key which you implemented in react native admod is correct or not.
I currently have a react-native project that uses react-native-maps and Viro. Viro requires a rn version of rn 0.59.9 so I'm not using the latest version in this project.
It's currently set up to use the native apple maps when using an iPhone simulator which works fine and I also have Viro working as well. The next step is to start adding directions from the current user's location to different places around them and I planned on using Google Maps to do this.
Unfortunately I'm having a lot of issues trying to do this and having no luck working through the installation documentation.
My package.json currently looks like this:
{
"name": "LoveWinchester",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"postinstall": "jetifier -r"
},
"dependencies": {
"axios": "^0.19.0",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-gesture-handler": "~1.4.0",
"react-native-maps": "0.26.1",
"react-native-reanimated": "^1.4.0",
"react-native-screens": "^1.0.0-alpha.23",
"react-navigation": "^4.0.10",
"react-navigation-stack": "^1.10.3",
"react-viro": "2.17.0",
"rn-bottom-drawer": "^1.4.3"
},
"devDependencies": {
"#babel/core": "^7.7.2",
"#babel/runtime": "^7.7.2",
"babel-jest": "^24.9.0",
"jest": "^24.9.0",
"jetifier": "^1.6.4",
"metro-react-native-babel-preset": "^0.57.0",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"
}
}
And my Podfile looks like below:
target 'LoveWinchester' do
platform :ios, '9.3'
pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit_static_lib', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/static_lib'
pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNScreens', :path => '../node_modules/react-native-screens'
pod 'react-native-maps', :path => '../node_modules/react-native-maps'
end
Any help would be really appreciated!!
Added the pod GoogleMaps
pod 'GoogleMaps'
after that goto iOS folder & install it
cd ios
pod install
Now, you will probably get an error react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS.
In order to solve this, go to iOS folder & open your .xcworkspace file because now you need to add AirGoogleMaps to the project.
Go into your node_modules in your project and navigate to the AirGoogleMaps folder.
/node_modules/react-native-maps/lib/ios/AirGoogeMaps
Drag the AirGoogleMaps folder into your project. After dropping that folder into your project there will be a pop-up window in which you will specify to Create groups. (Not create folder references)
Then go inside xcode > build settings > Preprocessor Macros > & add HAVE_GOOGLE_MAPS=1 Preprocessor Macro to Build Settings
In order to use Google Maps, you will need to create a Google Maps API key.
After that go to AppDelegate.m & add below lines to your code
#import <GoogleMaps/GoogleMaps.h>
[GMSServices provideAPIKey:#"YOUR_API_KEY"]
Finally, change your MapView component
import MapView, {PROVIDER_GOOGLE} from "react-native-maps";
<MapView provider={PROVIDER_GOOGLE} />
That's it. Hope this will helps you. Feel free for doubts.
For more informations check this
I'm trying to integrate clevertap with native react and when I include "use_frameworks!" in cocoa pods to be able to use
#import <CleverTapReact / CleverTapReactManager.h>
a compilation error is generated in UMLCore
Already make the link of the application with clevertap
Install all the package throught "yarn install"
Install the pods throught "pod install"
This is my podfile:
//----
target 'discovery' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Google-Mobile-Ads-SDK'
pod 'CleverTap-iOS-SDK'
pod "Segment-CleverTap"
use_unimodules!
use_frameworks!
target 'discoveryTests' do
inherit! :search_paths
end
end
//----
I expect a good compilation for the app, and instead im getting a compilation error
this is the error code:
//----
info Undefined symbols for architecture x86_64:
"_UMLogError", referenced from:
+[UMUtilities NSDate:] in UMUtilities.o
-[UMViewManager updateProp:withValue:onView:] in UMViewManager.o
info "_UMLogInfo", referenced from:
+[UMUtilities UIColor:] in UMUtilities.o
info "_UMLogWarn", referenced from:
-[UMModuleRegistry registerExportedModule:] in UMModuleRegistry.o
-[UMModuleRegistry registerViewManager:] in UMModuleRegistry.o
-[UMModuleRegistry registerSingletonModule:] in UMModuleRegistry.o
-[UMModuleRegistryProvider moduleRegistryForExperienceId:] in UMModuleRegistryProvider.o
-[UMViewManager updateProp:withValue:onView:] in UMViewManager.o
ld: symbol(s) not found for architecture x86_64
info clang: error: linker command failed with exit code 1 (use -v to see invocation)
//----
It seems like you're integrating CleverTap React Native using Cocoapods for your iOS Application and in my understanding issue is that you're unable to find the CleverTapReactManager.h class.
I would suggest adding pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native' as a dependency in your ios/Podfile instead of pod 'CleverTap-iOS-SDK'
This local clevertap-react-native Podspec integrate the React Native iOS bridge via Cocoapods.
Helping link to install the same: https://github.com/CleverTap/clevertap-react-native/blob/master/docs/install.md#installing-clevertap-react-native
Hope this helps. For further questions, you can post on https://community.clevertap.com/
or while importing in Appdelegate file , instead of
#import <<CleverTapReact/CleverTap.h>
#import <CleverTapReact/CleverTapReactManager.h>
use
#import <CleverTapReactManager.h>
#import <CleverTap.h>