Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve Xcode signing docs #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions setup-xcode-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@ In order to build an iOS app with custom entitlements, you'll need to setup _cod

> 💡 Certificates are saved to your local Keychain so you don't need to set them up often.

![code-signing-page](https://user-images.githubusercontent.com/9664363/112059266-db521e00-8b18-11eb-9538-2a31c6bd6e39.png)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put the images into this repo, as that appears to be the pattern used now.



1. Open your iOS project in Xcode by running `xed ios` or `open ios/<yourproject>.xcworkspace` in your Terminal. If your Expo project doesn't have an `ios` folder, run `npx expo prebuild -p ios` to generate one locally.
2. Select the first project in the **navigator** then the target with the matching native in the "project and targets list".
3. Select "Signing & Capabilities", ensure you have "Automatically manage signing" selected.
4. Ensure a "Development Team" is selected, this may require that you sign-in to your Apple Developer account.
1. Press the "Add Account" button next to the team label. Follow the sign in flow.
5. Select a physical device to build the app onto, Xcode will add this device to your account.
6. Build the app onto your device.
1. You may need to "trust" the device you just added to the Xcode "Development Certificate", this is done in your iOS device.
2. Navigate: Settings > General > Device Management > [your new certificate] > Trust.

![](./assets/setup-xcode-signing/01-add-signing-account.png)

5. Select a physical device from the dropdown at the top-center of the UI. Xcode will add this device to your account.
6. Build the app onto your device by pressing the "Play" symbol at the top-left of the the UI.
Comment on lines +15 to +16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were the two steps that confused me before. I added a screenshot for clarity.


![](./assets/setup-xcode-signing/02-build-app-for-device.png)

1. You may need to "trust" the device you just added to the Xcode "Development Certificate", this is done in your iOS device in: Settings > General > Device Management > [your new certificate] > Trust.
Learn more: [Apple docs (MaintainingCertificates)](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html).
2. You may need to enable Developer Mode for your device. This is done in your iOS device in: Settings > Privacy > Developer Mode.
If the Developer Mode option doesn't appear, you might need to unplug your iOS device from your computer.
Learn more: [Apple docs (Enabling Developer Mode)](hhttps://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also bit me, especially the fact that you can't see "Enable Developer Mode" when your device is plugged in (lol).


Now you can return to Expo CLI and build your project locally with `npx expo run:ios`. This process only needs to be done once per computer / account, you don't need to do this for every new native project.
7. Now you can return to Expo CLI and build your project locally with `npx expo run:ios`. The process above only needs to be done once per computer / account, you don't need to do this for every new native project.

> Simulators require code signing when certain entitlements are enabled, e.g. Associated Domains.