diff --git a/docs/howto/build-run.md b/docs/howto/build-run.md index 8e3f209ee99..12543bb760a 100644 --- a/docs/howto/build-run.md +++ b/docs/howto/build-run.md @@ -505,3 +505,9 @@ Optionally, reset iOS simulator: ``` iOS Menu > Simulator > Reset Content and Settingsā€¦ ``` + +If you get other iOS build failures and you haven't changed anything +in the `ios` folder yourself, and you're on the latest version of +Xcode, there might be residue from a previous build interfering in +this one. So, try cleaning the build folder, following the +instructions at [iOS tips](ios-tips.md#clearing-the-build-folder) diff --git a/docs/howto/ios-tips.md b/docs/howto/ios-tips.md index cfe6c864b8b..85f32505561 100644 --- a/docs/howto/ios-tips.md +++ b/docs/howto/ios-tips.md @@ -57,3 +57,18 @@ 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 + +## Clearing the build folder + +If you get build failures on iOS and you haven't changed anything in +the `ios` folder yourself, and you're on the latest version of Xcode, +there might be residue from a previous build interfering with this +one. So, try cleaning the build folder with `rm -rf`. 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.