diff --git a/docs/howto/build-run.md b/docs/howto/build-run.md index 91fc33c43af..84547e9dcf7 100644 --- a/docs/howto/build-run.md +++ b/docs/howto/build-run.md @@ -505,3 +505,16 @@ Optionally, reset iOS simulator: ``` iOS Menu > Simulator > Reset Content and Settingsā€¦ ``` + +If you get other build failures on iOS and you haven't changed +anything in the `ios` folder yourself, there might residue from a +previous build interfering in this one. So, try cleaning the build +folder. A different folder is used for command-line builds and builds +through Xcode. +- If building from the command line with `react-native run-ios`, run + `rm -rf ios/build`. +- If building in Xcode, the build folder is at a path like + `~/Library/Developer/Xcode/DerivedData/ZulipMobile-diuocloqwafvdpeozujwphdrhalf` + (the hash at the end will be different) by default, but if it's not + there, you can find it in Xcode at File > Workspace Settings > Build + Location. \ No newline at end of file diff --git a/docs/howto/ios-tips.md b/docs/howto/ios-tips.md index cfe6c864b8b..d0882ba3802 100644 --- a/docs/howto/ios-tips.md +++ b/docs/howto/ios-tips.md @@ -7,6 +7,11 @@ environment](build-run.md#main-steps) for Zulip Mobile. `react-native run-ios` will launch a new terminal with the React Native packager and open up the app in the iOS simulator. +If the build fails and you haven't changed anything in the `ios` +folder yourself, there might residue from a previous build interfering +in this one. Run `rm -rf ios/build` and try again, or see our [build +failure troubleshooting doc][build-run-troubleshoot]. + It will also launch a browser tab in Chrome with the React Native debugger. `console.log` statements in React Native will end up in the JS console on this tab. @@ -41,6 +46,16 @@ obtain Apple Developer credentials that will allow you to sign the app. Register at https://developer.apple.com. Then use your Apple ID in Xcode and choose it as your `Signing > Team` for both ZulipMobile and ZulipMobileTests. +If it's not your first time, and you haven't changed anything in the +`ios` folder yourself, you might see build failures caused by +interfering residue from a previous build. If you do, clear Xcode's +build folder for ZulipMobile with `rm -rf`, or through Finder. The +default path for the build folder is +`~/Library/Developer/Xcode/DerivedData/ZulipMobile-diuocloqwafvdpeozujwphdrhalf` +(the hash at the end will be different), but you can find it in Xcode +at File > Workspace Settings > Build Location. If that doesn't fix it, +see our [build failure troubleshooting doc][build-run-troubleshoot]. + ### Tips when running on your iOS device When you change the BundleIdentifier and Team (required in order to run on a device), it **will** modify your `.pbxproj` file, which you do **not** want unless you intend @@ -57,3 +72,4 @@ unstaged. Later, you can always [squash that commit with other commits][fixing-commits], if appropriate. [fixing-commits]: https://zulip.readthedocs.io/en/latest/git/fixing-commits.html +[build-run-troubleshoot]: build-run.md#troubleshooting \ No newline at end of file