Skip to content

Commit

Permalink
ios docs: Suggest clearing the build folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bobbe committed Apr 8, 2020
1 parent bbddb91 commit 09f1c1a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/howto/build-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
16 changes: 16 additions & 0 deletions docs/howto/ios-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 09f1c1a

Please sign in to comment.