I have to follow this guide every time I wish to start my app on iphone simulator: https://stackoverflow.com/a/55776414/4662347
I used to not have any problems, but since I started using pods this problem appeared.
First time when I run react-native run-ios
it works. But then second time when I try running it fails like this:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening KoirapuistoApp.xcworkspace
If I run it from xcode it fails like this:
ld: library not found for -lDoubleConversion...
But in xcode if I open my app as myApp.xcworkspace, then build will succeed. Problem is I can't develop through xcode, I need the react-native run-ios command to work.
My Pods file looks like this:
project 'MyApp.xcodeproj'
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
# Allowed sources
source 'https://github.com/CocoaPods/Specs.git'
target 'myapp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for myapp
# Point to the installed version
pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec'
# React/React-Native specific pods
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
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 'myapp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'myappTests' do
inherit! :search_paths
# Pods for testing
end
end
Question is, how do I get the app working every time when I issue the basic dev command?:
react-native run-ios
My react-native version: 0.59.10