diff --git a/Setup.md b/Setup.md index 3abbbefac..13f0e5197 100644 --- a/Setup.md +++ b/Setup.md @@ -10,7 +10,7 @@ This guide will walk through the setup process required in order to get the GitH 2. In terminal clone the repo using: `git clone https://github.com//GitHawk.git` -## 2. Installing +## 2. Installing ``` cd GitHawk @@ -19,7 +19,27 @@ bundle exec pod install npm install ``` -## 3. Setting up code-signing (With automatic code-signing) +## 3. Setting up OAuth for login + +To be able to log in during development, you'll need a Client ID and Client Secret. +To get these, [register](https://github.com/settings/applications/new) a new OAuth application on GitHub. + +### Registering + +Here, you will need to fill in an Application name, Homepage URL and Authorization callback URL. +Make sure the Authorization callback URL is set to `freetime://`. The others can be filled in as you wish. + +You'll be redirected to the application page where you can access your Client ID and Client Secret. + +To add the Client ID and Client Secret to the App, follow these steps: + +1. In Xcode, go to `Product` (in the Menu bar) > `Scheme` > `Manage Schemes...` +2. Select `Freetime-AppCenter` and click `Edit...` +3. Go to `Run` > `Arguments` +4. Add your Client ID (`GITHUB_CLIENT_ID` as key) and Client Secret (`GITHUB_CLIENT_SECRET`) to the Environment Variables. + + +## 4. Setting up code-signing (With automatic code-signing) 1. Open the Xcode workspace called: `Freetime.xcworkspace` (`open Freetime.xcworkspace`) @@ -28,7 +48,7 @@ npm install **Setting up bundle and group ID’s** - - - - -2. Open the projects settings ![](./Design/projectIcon.png). +2. Open the projects settings ![](./Design/projectIcon.png). On the left there under Targets should be: * Freetime @@ -37,13 +57,13 @@ On the left there under Targets should be: * FreetimeWatch Extension 3. Under each of these targets make sure your in the _General_ tab. **Change the team** to the team associated with your Apple Developer Account and switch the bundle ID’s like so: - + **Freetime**: *com.xxxx.freetime* ➡️ *com.``.freetime* - + **FreetimeWatch**: *com.xxxx.freetime.watchkitapp* ➡️ *com.``.freetime.watchkitapp* - + **FreetimeWatch Extension**: *com.xxxx.freetime.watchkitapp.watchkitextension* ➡️ *com.``.freetime.watchkitapp.watchkitextension* 4. Under the _Capabilities_ tab change the App Group ID’s like so (Does not apply to FreetimeTests): @@ -52,7 +72,7 @@ On the left there under Targets should be: 2. Create new group ID (Click plus in the bottom left) and name it *group.com.``.freetime* > *Note: All group ID’s must be the same (This is what groups them!)* - + > Checkpoint: All errors should have disappeared (You should still not be able to build successfully though) @@ -71,25 +91,4 @@ On the left there under Targets should be: > Checkpoint: At this point you should be able to successfully build the app (But not able to sign in) -## 4. Setting up OAuth for login - -To be able to log in during development, you'll need a Client ID and Client Secret. -To get these, [register](https://github.com/settings/applications/new) a new OAuth application on GitHub. - -### Registering - -Here, you will need to fill in an Application name, Homepage URL and Authorization callback URL. -Make sure the Authorization callback URL is set to `freetime://`. The others can be filled in as you wish. - -You'll be redirected to the application page where you can access your Client ID and Client Secret. - -To add the Client ID and Client Secret to the App, follow these steps: - -1. In Xcode, go to `Product` (in the Menu bar) > `Scheme` > `Manage Schemes...` -2. Select `Freetime-AppCenter` and click `Edit...` -3. Go to `Run` > `Arguments` -4. Add your Client ID (`GITHUB_CLIENT_ID` as key) and Client Secret (`GITHUB_CLIENT_SECRET`) to the Environment Variables. - - Build and Code away! -