These past few hours an issue has been occurring within React Native 0.68.2 on an iOS build attempt that prevents me from building my project at all, forcing me to reclone every time from the git repository to recover.
After a few edits and builds, running npm run ios
results in it getting stuck at Planning Build..
. When I try to manually open the XCode project file, it instantly goes into an unresponsive state.
What the Terminal outputs in its entirety when the command is ran:
(base) myMachine project-master % npm run ios
> [email protected] ios
> expo run:ios
✔ Installed pods and initialized Xcode workspace.
› Planning build (hangs here)
I’ve tried steps listed in a previous question regarding the issue, however none of them have worked, and I constantly need to fetch the project again. Is there any way to fix this once and for all? Has been driving me crazy.
react-native info
:
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 279.42 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - /opt/homebrew/opt/node@16/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.11.0 - /opt/homebrew/opt/node@16/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 17.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
package.json
{
"name": "project",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.6",
"@react-native-community/netinfo": "^9.0.0",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"@react-navigation/stack": "^6.2.1",
"expo": "~45.0.0",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-azure-auth": "^1.8.3",
"react-native-gesture-handler": "^2.4.2",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.13.1",
"react-native-web": "0.17.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}
2
Answers
This seems to be a weird issue with how XCode behaves with iCloud folders (Desktop, Documents, etc). Seemingly now fixed by moving my development directory to my home folder (
~/Dev/Project
).I uninstalled react native client and then used npx react-native run-ios
npm uninstall -g react-native-cli
npx react-native run-ios