9/22/2021

React Native iOS 15 Upgrade Work

Most of my day today was tidying up things for iOS 15. Of course, Fish Rules works on iOS 15 on launch day…but there are always a thousand things to tidy up. I’ve had a build ready to go for about a week where we chuck in these tweaks. There was a lot more of it today than I realized. Below are a few major blockers that ate up almost my entire day:

RN Codegen

One particular build issue was the fact that the new RN version needs you to install this:

npm install react-native-codegen --save-dev

The errors I was getting were Flipper-Folly errors which masked the actual issue. As usual, the React Native upgrade guide helped immensely. Also, not obvious was bumping the metro-react-native-babel-preset plugin to the latest version.

LogBox API’s don’t work and errors (which used to be warnings) pop up everywhere

This one was pretty frustrating. What used to be a warning is now an error that takes over the whole screen in dev mode (Those red screen of death flyovers). The LogBox API’s for ignoring it doesn’t work either. At the end of the day, the only thing I could get to work was overriding the console error function with my own:

console.error = log.error;

Some references:

https://github.com/facebook/react-native/blob/afe0c1daea0aaf7b40b7ded08d6eb6d45b17099c/Libraries/Lists/VirtualizedList.js#L1135

https://github.com/facebook/react/pull/15170

Other Upgrades

This doc from the React Native team covers a lot of the minor things that need to be done:

https://reactnative.dev/blog/2021/09/01/preparing-your-app-for-iOS-15-and-android-12

XCode build step missed the default Node binary

I’ve had this happen before. For some reason, the build step fails whenever I upgrade XCode (which is like once a year). i.e. This build phase:

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh

Here’s a helpful StackOverflow & GitHub issue of the problem:

https://stackoverflow.com/questions/44492197/react-native-ios-build-cant-find-node

https://github.com/facebook/react-native/issues/27860

Bizarre XCode Archive Upload Error???

Your version of iTMSTransporter will be updated in approximately 9 days.

What does this even mean?!

This is an archived post, some things might not display right.

Copyright © Rick BlalockView Archive