Do you ever have this dreaded error while developing for react-native application in iOS? It takes 1 workday to finally solved this issue, since the error code a bit vague.
My list of version while having this issue:
-OSX Catalina 10.15.7
- react-native 0.61.4
-Xcode 12.X
-Product Name in iOS App name with > 1 Word. <- This is what caused my issue
My issue is exactly because my iOS app is having a 2 word Product Name. This is what causes an issue. The recent version of Xcode 12 is escaping the whitespace in buildOutput.
There are many ways to fix this issue.
- Upgrade the react-native to version 0.62++, since there is a fix in react-native-community/cli version 4. You can read it here. I am not doing this, since I just maintaining the project, to change the splash-screen. It’s not worth the effort to fix the issue after upgrading.
- Change the Product Name into a single word application name. It’s not viable in my case too, since it’s my client brand, and cannot rebrand it as another name.
- Simply patching the react-native-community/cli version 3 with this or this git history. The downside is if you working on multiple devices, you must apply this manually again, or if you upgrade the yarn/npm package.
- Downgrading the Xcode into 11.7, in my case, It’s what I do.
Some references help me solve this issue.
-https://github.com/react-native-community/cli/issues/1208
-https://github.com/react-native-community/cli/pull/1236
-https://github.com/react-native-community/cli/issues/1235
-https://stackoverflow.com/a/41134683/4289609