This page will teach you tips and tricks if you need to use Xcode for Swift development. React Native developers might find useful information too.

Downloading Xcode

You can download it from the App Store, but that takes forever to download and update, so we can download it directly from Apple's developer software website or Xcode releases.

  1. Search for "xcode" and find the version you want.
  2. Download the .xip file and extract it using the following command:
  3. Move the extracted .app file to the Applications folder and you're done!

<aside> 💡 Note: To download Xcode with the method described above, you'll need to have a developer account. You can contact ‣, ‣ or ‣ so they can add you to Z1's team.

</aside>

Text Editing options

Most projects have the linter set up to check these options, so you can configure Xcode to format the code for you. This makes sure everyone formats the code the same.

Open Xcode → Preferences... → Text Editing

Inside "Editing"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6fca50b1-54ab-44b8-b09a-f7dec0a17539/Captura_de_pantalla_2020-09-02_a_las_12.21.41.png

Inside "Indentation"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1c962fec-388f-4103-8565-83730a435310/Captura_de_pantalla_2020-09-02_a_las_12.25.14.png

Install GraphQL Extension

To have syntax highlighting on .graphql files, we need to install an extension to Xcode. You can download it and set it up following the instructions here.

<aside> 💡 Note: you may need to reinstall the extension every time Xcode updates.

</aside>

Code snippets

To speed up development, here are some custom code snippets you can add to Xcode. This code snippets follow our programming style. To use them press cmd + shift + L.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/24770bc2-60a2-4baf-90fc-6635ef6e3f0e/Captura_de_pantalla_2020-09-01_a_las_12.31.01.png