Context
I've update my react-native application, 0.59.10 to 0.60.6.
All works fine in the normal scheme, but when I change the scheme to another this error happen:
Problem:
ld: warning: directory not found for option '-L/Users/estuda-dev/Library/Developer/Xcode/DerivedData/EstudaVest-doghqrjrnoismnaovlqaiexzwebm/Build/Products/Debug.CPB-iphonesimulator/yoga'
ld: warning: directory not found for option '-F/Users/estuda-dev/workspace/estuda_app_aluno/ios/build/Debug-iphoneos'
ld: library not found for -lyoga
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Build failed 05/08/20 08:32 320.8 seconds
What I tried:
After this I've tried delete the DerivedData in Developer/Xcode following this tutorial:
https://programmingwithswift.com/delete-derived-data-xcode/
My Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'appname' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for appname
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-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 'RNRate', :path => '../node_modules/react-native-rate'
pod 'react-native-simple-toast', :path => '../node_modules/react-native-simple-toast'
pod 'GoogleSignIn', '~> 5.0.2'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React" || target.name == "yoga"
target.remove_from_project
end
end
end
target 'appnameTests' do
inherit! :search_paths
# Pods for testing
end
target 'appnameUITests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
To solve this problem I made a script which runs in the Build Phase to create a "yoga.a" file in this path:
~/Library/Developer/Xcode/DerivedData/YourProjectNamePlusID/Build/Intermediates.noindex/ArchiveIntermediates/YourBundlename/BuildProductsPath/Release
Related
I run pod install in src/ios/ directory and it says this:
No podspec found for `RNFirebase` in `../node_modules/react-native-firebase`
The thing is that it worked before, now it doesn't and I don't know why really.
This is my Podfile:
platform :ios, '11.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target '<App_Name>' do
# Pods for <App_Name>
pod 'Firebase/Core', '~> 6.13.0'
pod 'Firebase/Messaging', '~> 6.13.0'
pod 'Firebase/Analytics'
# Required by RNFirebase v5 Crashlytics
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'Firebase/DynamicLinks', '~> 6.13.0'
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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'RNAppleAuthentication', :path => '../node_modules/#invertase/react-native-apple-authentication'
pod 'RNCPicker', :path => '../node_modules/#react-native-community/picker'
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'
pod 'react-native-ibm-mobilefirst', :path => '../node_modules/react-native-ibm-mobilefirst'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
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 'react-native-google-maps', path: '../node_modules/react-native-maps' # <~~ if you need GoogleMaps support on iOS
pod 'GoogleMaps' # Uncomment this line if you want to support GoogleMaps on iOS
pod 'Google-Maps-iOS-Utils' # Uncomment this line if you want to support GoogleMaps on iOS
# pod 'RNFirebase/Crashlytics', :path => '../node_modules/react-native-firebase/ios'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'Firebase/Auth', '~> 6.13.0'
pod 'RNFastImage', :path => '../node_modules/react-native-fast-image'
pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation'
pod 'react-native-geolocation-service', :path => '../node_modules/react-native-geolocation-service'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNInAppBrowser', :path => '../node_modules/react-native-inappbrowser-reborn'
pod 'react-native-maps', :path => '../node_modules/react-native-maps'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'
pod 'react-native-geolocation', :path => '../node_modules/#react-native-community/geolocation'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
target '<App_Name>Tests' do
inherit! :search_paths
# Pods for testing
end
post_install do |installer|
## Fix for XCode 12.5 beta
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))")
end
# use_native_modules!
end
target '<App_Name>-tvOS' do
# Pods for <App_Name>-tvOS
target '<App_Name>-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
As you can see down there, I have:
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
If I add /ios to the end there, the pod install will work but then it can't build it in Xcode.
I tried many solutions, nothing worked for me.
I tried deintegrate Cocoapods and pod install after that.
I tried deleting node_modules folder and then install again.
Also tried deleting Pods folder as well as the Podfile and Podfile.lock and then installing them again. Nothing worked.
I use Ventura. Xcode 14.
Check that path ../node_modules/react-native-firebase, keep in mind it's a relative path, so should start from the folder where is your Podfile file.
Also in that folder ../node_modules/react-native-firebase should be file with extension .podspec
Please add this import in AppDelegate file:
#import <Firebase.h>
Just add /ios to the end of the path, like this:
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
My podfile cotains static library from reactnative on node_modules and also third-party-podspecs like Folly.podspec, glog.podspec, DoubleConversion.podspec and a dynamic swift library
when i try to excecute the projet i have errors with third-party-podspecs
double-conversion/double-conversion.h' file not found
here is my podfile :
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
#sdk id libs
source 'https://gitlab-repoxxxxxxxf.fr/dosn/xxxx.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'MyProject' do
use_frameworks!
# Pods for DigiDrive
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-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 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'react-native-simple-toast', :path => '../node_modules/react-native-simple-toast'
#sdk id libs
pod 'IMPORTANTLIB'
target 'MyProjectTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method,
:verify_no_static_framework_transitive_dependencies) {}
end
target 'MyProject-tvOS' do
# Pods for DigiDrive-tvOS
target 'MyProject-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
How can i resolve this problem ?
I just do more search and i understand that react native 0.60 version doesn't support use of use_frameworks!, so i had to pass to the last react native version : 0.63.0 but the problem is that several version of libs has to be changed on reactNative
I do not use use_frameworks and use_native_modules in my podfile. It runs as usual when I enable use_native_modules, but build fail when I use use_frameworks.
I've read to understand what use_frameworks for but I'm not aware of the differences between this two.
platform :ios, '8.0'
use_frameworks!
target "CityWhether" do
pod 'Alamofire'
pod 'SwiftyJSON'
use_native_modules!
end
Guess I have understand both the difference (please correct me if my understanding is incorrect),
For use_frameworks! please read here as it has already describe what it's for.
For use_native_modules!, it's actually being use in React Native 0.60 and above for auto-linking. With the command specified in podfile, all the new dependency appended to project do not require developer to append new dependency's podspec into podfile. It will link automatically when you run pod install command.
I have been appending all the podspecs myself ever since I upgraded to RN0.60 😅
Sample podfile
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'example' do
# Pods for example
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
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'
target 'exampleTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'example-tvOS' do
# Pods for example-tvOS
target 'example-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
the header file search way maybe has been changed, so you can not build sucess
Xcode throws the following linker error:
duplicate symbol '_kSessionVariantKey' in:
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/CleverTap-iOS-SDK/libCleverTap-iOS-SDK.a(CTABTestUtils.o)
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/Mixpanel/libMixpanel.a(MPABTestDesignerConnection.o)
duplicate symbol '_OBJC_IVAR_$__MPRunLoopThread._waitGroup' in:
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/CleverTap-iOS-SDK/libCleverTap-iOS-SDK.a(CTWebSocket.o)
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/Mixpanel/libMixpanel.a(MPWebSocket.o)
duplicate symbol '_OBJC_IVAR_$__MPRunLoopThread._runLoop' in:
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/CleverTap-iOS-SDK/libCleverTap-iOS-SDK.a(CTWebSocket.o)
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/Mixpanel/libMixpanel.a(MPWebSocket.o)
duplicate symbol '_OBJC_CLASS_$__MPRunLoopThread' in:
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/CleverTap-iOS-SDK/libCleverTap-iOS-SDK.a(CTWebSocket.o)
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/Mixpanel/libMixpanel.a(MPWebSocket.o)
duplicate symbol '_OBJC_METACLASS_$__MPRunLoopThread' in:
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/CleverTap-iOS-SDK/libCleverTap-iOS-SDK.a(CTWebSocket.o)
/Users/apple/Library/Developer/Xcode/DerivedData/SmallcaseIos-fntvhvlzlxqompcrpbimpmiwsjiq/Build/Products/Debug-iphonesimulator/Mixpanel/libMixpanel.a(MPWebSocket.o)
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems like there are duplicate symbols in libCleverTap-iOS-SDK.a and libMixpanel.a.
I'm on RN-0.61 and both the libraries are auto linked. The pod-file is using use_modular_headers! because some dependencies need it.
Both the libraries were linked and used to work fine before I put in use_modular_headers!.
I can't seem to figure out what I'm doing wrong.
podfile -
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'SmallcaseIos' do
# react pods
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec', :modular_headers => false
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
# Pods for SmallcaseIos
use_modular_headers!
pod 'SwiftyJSON', '3.1.4'
pod 'Charts', '3.3.0'
pod 'Branch', '0.27.1'
use_native_modules!
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
it's very simple process go to file => workspace setting => build system and click on that and select it to "Legacy Build System" and press done then clear the build and run again it's work.
Before upgrading to 0.61.2 everything was compiling fine on Xcode but now, it throws
ld: library not found for -lReact
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Specifically to my AppTests, not the app itself.
This is my Podfile
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'MyApp' do
# Pods for MyApp
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
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-Core/RCTWebSocket', :path => '../node_modules/react-native/'
# pod 'React-ART', :path => '../node_modules/react-native/Libraries/ART'
# pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
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 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'MyApp-tvOS' do
# Pods for MyApp
target 'MyApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
And on Xcode, it throws that error but indicating it's on MyAppTests.
I'm using the .xcworkspace and not .xproject file. (using CocoaPods)
I followed this guideline and applied every change showing from 0.60.6 to 0.61.2.
Any idea of what could be failing here? Tried deleting DerivedData folder, cleaned and re-compiled like 5 times already but still fails in the same spot.
I even deleted the libReact.a from my /Frameworks folder. Still didn't work.
Thanks.