Faced this issue while upgrading Expo bare workflow 0.38 (RN 0.62) to 0.39 (has RN 0.63). Edited answer of @Pritish did work, But it says this error
[!] Unable to find a target named `RNTodo-tvOS` in project `RNTodo.xcodeproj`, did find `RNTodo`.
And
[!] Unable to find a target named `RNTodoTests` in project `RNTodo.xcodeproj`, did find `RNTodo`.
Got workaround by changing Podfile like below
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'daytodiary' do
use_unimodules!
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
# 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
What changed?
ADD unimodules at top
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
ADD use_unimodules!
before config = use_native_modules!
.
REMOVE
target '[YourProjectName]Tests' do
inherit! :complete
# Pods for testing
end
REMOVE
target 'RNTodo-tvOS' do
# Pods for RNTodo-tvOS
target 'RNTodo-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
For Android (If you are getting errors after upgrading)
In android/build.gradle
Change
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
}
To
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
}