This is the series of steps I took to upgrade react-native after I found out that the current yarn ios
command is not compatible with Xcode 13. These are the steps I took to get different error messages, not a full set of commands / steps I ran...
From package/app
:
npx react-native upgrade
From package/app/ios
:
pod install
In package/app/ios/Podfile
(not sure if this was neccessary but was running into issues compiling RCT-Folly)
...
def add_flipper_pods!
version = '~> 0.87.0'
...
I then needed to do the step described in this Stack Overflow Post. This didn't work...
I then had a build error that a React Native Core module couldn't be compiled. Doing a yarn upgrade
fixed that build error, but then causes this:
/Users/ozziekirkby/Documents/github.com/andymatuschak/orbit/node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm:98:72: error: no member named 'cancelButtonTintColor' in 'JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions'
[RCTConvert UIColor:options.cancelButtonTintColor() ? @(*options.cancelButtonTintColor()) : nil];
~~~~~~~ ^
2 errors generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/ozziekirkby/Library/Developer/Xcode/DerivedData/Orbit-addcqdcmatzuwfbulfyrptdixylv/Build/Intermediates.noindex/Pods.build/Debug-maccatalyst/React-CoreModules.build/Objects-normal/x86_64/RCTActionSheetManager.o /Users/ozziekirkby/Documents/github.com/andymatuschak/orbit/node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-CoreModules' from project 'Pods')
(1 failure)
I tried to manually bump react-native
and react
, as well as nuke my pods and ran pod install --repo-update
. In this case, I ran into the ld: framework not found EXFileSystem
error.
ld: warning: directory not found for option '-L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/iOSSupport/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/maccatalyst'
ld: framework not found EXFileSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/ozziekirkby/Library/Developer/Xcode/DerivedData/Orbit-addcqdcmatzuwfbulfyrptdixylv/Build/Products/Debug-maccatalyst/Orbit.app/Contents/MacOS/Orbit normal
(1 failure)
I retried approach 1, except I nuked my node_modules
and my Pods
and ran it to make sure I was inline with the current master. I then did the upgrade process described in Approach 1. Also, I bumped the Podfile version to 12.0
because some github posts hinted that this might help, however it just left with the same error as approach 2.
As a last ditch effort, I redownloaded Xcode 12.5.1. To my surprise Xcode <13 is not compatiable on Monterey? So I had todo this workaround. Ultimately, doing a similiar steps as described as Approach 1, I was left with the infamous ld: framework not found EXFileSystem
error.
I quit at this point 😩