Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Merged
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
55 changes: 27 additions & 28 deletions Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<YourGithubName>/GitHawk.git`

## 2. Installing
## 2. Installing

```
cd GitHawk
Expand All @@ -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`)
Expand All @@ -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
Expand All @@ -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.`<yourRegularBundleName>`.freetime*

**FreetimeWatch**: *com.xxxx.freetime.watchkitapp* ➡️
*com.`<yourRegularBundleName>`.freetime.watchkitapp*

**FreetimeWatch Extension**: *com.xxxx.freetime.watchkitapp.watchkitextension* ➡️ *com.`<yourRegularBundleName>`.freetime.watchkitapp.watchkitextension*

4. Under the _Capabilities_ tab change the App Group ID’s like so (Does not apply to FreetimeTests):
Expand All @@ -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.`<yourRegularBundleName>`.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)


Expand All @@ -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!