IOS build warning: the transform cache was reset

Viewed 13461

I am getting this build warning from my React Native project in Xcode

warning: the transform cache was reset.

Hope someone can help me get rid of it!

Thanks in advance.

4 Answers

I was getting a similar warning when running the react native bundling script located at node_modules/react-native/scripts/react-native-xcode.sh. I had to remove this line

--reset-cache \ 

to get rid of the error.

Well I'm late to this party but might as well contribute with what happened to me. I've been having this issue for the last few days and the message the transform cache was reset was not the actual problem. It is a warning after all. The real issue in my case was that node was running out of memory. There is one quick way to patch it but chances is you'll have to trim down on packages.

For the patch go on Build Phases > Bundle React Native code and images

Change

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

To

export NODE_BINARY=node
export NODE_OPTIONS="--max_old_space_size=4096"
../node_modules/react-native/scripts/react-native-xcode.sh

Again, this is just a patch, so chances is if you're having this problem there's a reason why node is running out of memory.

Run $ npx react-native start --reset-cache for remove the warning. Then start your app with

 $ npx react-native run-ios --variant=release

Invoke the React Native bundling script in a Run Script build phase as follows:

../../node_modules/react-native/scripts/react-native-xcode.sh | sed 's/warning: //'

This will remove the word "warning:" from the output.

Related