Skip to content

Commit 38aa48f

Browse files
committed
Rework the build other apps page for using github organization
1 parent afa4454 commit 38aa48f

1 file changed

Lines changed: 65 additions & 73 deletions

File tree

docs/browser/other-apps.md

Lines changed: 65 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,14 @@ Once Loop 3 was released with the ability to build using a browser, a lot of oth
99

1010
If you want to build another DIY app that is not included here, look for the file `fastlane/testflight.md` in the *GitHub* repository associated with that app and open it in a browser. The instructions for that app should be located in that file.
1111

12-
The same technique is used and the same six <code>Secrets</code> are applied to each `repository`. Those secrets are tied to your *Apple* Developer ID and your *GitHub* account.
12+
The same technique is used and the same six <code>Secrets</code> are used for many Open-Source apps. Over time, it is expected that more apps will use the `variable` ENABLE_NUKE_CERTS to allow automatic creation and update of the required certificates.
13+
14+
* Did you start building with your personal account and want to switch to the recommended organization account for buiding?: [Switch to a GitHub Organization Account](#switch-to-a-github-organization-account)
1315

1416
### Updating / Rebuilding Other Apps
1517

1618
If you are coming to this page to update one of the other apps, follow the [How to Update or Rebuild](bb-update.md#how-to-update-or-rebuild){: target="_blank" } instructions provided for the *Loop* app, but substitute the repository name for the app you want to rebuild for all references to&nbsp;*<span translate="no">LoopWorkspace</span>*.
1719

18-
### Optional Build Method
19-
20-
!!! tip "Set up a Organization Account"
21-
If you are going to be building a lot of different apps, you should set up a free organization account with *GitHub* and use that to build.
22-
23-
Pros:
24-
25-
* The 6 <code>Secrets</code> and 1 `Variable` can be added to the organization one-time and apply to every repository
26-
27-
Cons:
28-
29-
* None other than a little prep work:
30-
* [Switch to a *GitHub* Organization Account](#switch-to-a-github-organization-account)
31-
3220
### Multiple Copies of `LoopFollow`
3321

3422
For the convenience of caregivers who use `LoopFollow` to monitor multiple people, updates were added in v2.1.2 to make this more convenient. This works regardless of the build method. (Build with Browser or [Build with *Mac*](https://www.loopandlearn.org/loop-follow#lf-script){: target="_blank" }).
@@ -48,17 +36,12 @@ For the convenience of caregivers who use `LoopFollow` to monitor multiple peopl
4836
* After all your secrets are collected, continue on this page with [<span translate="no">Fork and Add Secrets</span>](#fork-and-add-secrets).
4937

5038
## <span translate="no">Fork and Add Secrets</span>
51-
52-
!!! important "Use the <code>repository</code> for the application you are building"
53-
Many graphics show&nbsp;<span translate="no">LoopWorkspace</span>. You need to replace that with the <code>repository</code> for the app you want to build. You may need to adjust the App Name, the Shared App Group and look for different Identifiers.
54-
55-
Instructions for&nbsp;_<span translate="no">LoopCaregiver</span>_&nbsp;or &nbsp;_<span translate="no">LoopFollow</span>_ are found on this page.
56-
57-
Other apps such as xDrip4iOS and Trio can also be built with this method. Refer to the repository associated with those other apps, examine the fastlane folder and open the testflight.md file in your browser to get specific details for building that app.
5839

59-
You will return to this page after reviewing (but not doing) this step [Configure to Use Browser: <span translate="no">Fork LoopWorkspace</span>](prepare-fork.md#fork-loopworkspace)
40+
> If you are not using an organization, stop and reconsider. This page assumes an organization and that you have added your `Secrets` and your `Variable` to your organization. If not, then for every app you `fork` you must individually add those to the repository in your personal account.
6041
61-
* Use the same method as that section, but <span>`fork` the `repository` for the app</span> you plan to build
42+
You will return to this page after reviewing (but not doing) this step [Configure to Use Browser: <span translate="no">Fork LoopWorkspace</span>](prepare-fork.md#fork-loopworkspace){: target="_blank" }
43+
44+
* Use the same method as that section, but <span>`fork` the `repository` for the app</span> you plan to build to your *GitHub* organization
6245
* _<span translate="no">LoopCaregiver</span>_, expect the `dev branch`
6346
* _<span translate="no">LoopFollow</span>_, expect the `main branch`
6447

@@ -78,11 +61,13 @@ The two repositories below are only if you need to follow a second or third loop
7861

7962
## Configure <code>Secrets</code> for this App
8063

81-
> If you choose to use the optional *GitHub* organization method, you can skip this section:
64+
**When using a *GitHub* organization, you skip this section**:
65+
66+
* All `repositories` in your *GitHub* organization use the organization <code>Secrets and Variables</code>
67+
* If you have not already completed [Add <code>Secrets</code> to your *GitHub* Organization](#add-secrets-to-your-github-organization), do it now
68+
* Skip ahead to [Validate <code>Secrets</code>](#validate-secrets)
8269

83-
> * All `repositories` in your *GitHub* organization use the organization <code>Secrets</code>
84-
> * Make sure you complete [Add <code>Secrets</code> to your *GitHub* Organization](#add-secrets-to-your-github-organization) instead of this section
85-
> * Skip ahead to [Validate <code>Secrets</code>](#validate-secrets)
70+
### Using a Personal *GitHub* Account
8671

8772
After successfully creating your fork of the repository for this app:
8873

@@ -92,7 +77,7 @@ After successfully creating your fork of the repository for this app:
9277
* You should follow the detailed steps at [Configure to Use Browser: Configure <code>Secrets</code>](../browser/prepare-fork.md#configure-secrets){: target="_blank" }, except you will apply the <code>Secrets</code> to the repository for the app you are planning to build
9378
* Once your 6 secrets have been added, return to this page and skip ahead to [Validate <code>Secrets</code>](#validate-secrets) on this page.
9479

95-
### Add Existing <code>Secrets</code>
80+
#### Add Existing <code>Secrets</code>
9681

9782
Open the text file in which you maintain a copy of your 6 <code>Secrets</code> so you can copy each value into the <code>Secrets</code> for this repository.
9883

@@ -128,7 +113,7 @@ The workflows are now displayed: look at the list on the left side similar to th
128113

129114
This step validates most of your six <code>Secrets</code> and provides error messages if it detects an issue with one or more.
130115

131-
1. Click on the "Actions" tab of your *LoopFollow* or *LoopCaregiver*repository and enable workflows if needed
116+
1. Click on the "Actions" tab of your *LoopFollow* or *LoopCaregiver* repository and enable workflows if needed
132117
1. On the left side, click on 1. <code>Validate Secrets</code>
133118
1. On the right side, click `Run Workflow` to show a dropdown menu
134119
* You will see your default branch (`main` for LoopFollow, `dev` for LoopCaregiver)
@@ -191,7 +176,7 @@ The *LoopFollow* app does not require this extra step. You can skip ahead to [Cr
191176

192177
## Add `App Group` to `LoopCaregiver`
193178

194-
As of 2023 December 8, the *LoopCaregiver* app requires the addition of an `App Group` to an expanded list of `Identifiers`. Follow these steps one time to be able to build the *LoopCaregiver* app after this update.
179+
The *LoopCaregiver* app requires the addition of an `App Group` to each of its list of `Identifiers`. Follow these steps one time to be able to build the *LoopCaregiver* app.
195180

196181
### Check if `App Group` Exists
197182

@@ -278,8 +263,6 @@ The `Edit Your App ID Configuration` screen will open.
278263
!!! abstract "Same procedure as for the *Loop* app"
279264
You will follow the same procedure as you did with the *Loop* app.
280265

281-
You will also want to edit your new app once you create it to [Remove Apple Vision Pro](prepare-app.md#remove-apple-vision-pro){: target="_blank" }.
282-
283266
You will be following the directions below to create an App in App Store Connect if you don't already have one.
284267

285268
This requires you to provide some information. Examine the table below for the bundle ID associated with your app.
@@ -317,9 +300,17 @@ This requires you to provide some information. Examine the table below for the b
317300

318301
1. Click Create but do not fill out the next form. That is for submitting to the app store and you will not be doing that.
319302

320-
1. Edit your new app to [Remove Apple Vision Pro](prepare-app.md#remove-apple-vision-pro){: target="_blank" }
303+
You are done with the create app step. You will use this same browser location to complete the next step. Tap on the *TestFlight* tab at the top of the page.
304+
305+
## Add Users to *TestFlight* for App
306+
307+
You need to configure a *TestFlight* Internal Testing Group for each app you build and invite the users (including yourself).
308+
309+
* Each person added to the Internal Testing Group gets an invitation to join the group for this app
310+
* Then after each successful build of the app, group members will get a notification when the new build is transferred to *TestFlight* and is available for use
311+
* They open the *TestFlight* app on their phone to install the new build
321312

322-
You are done with this activity. Before you close this browser window, note the *TestFlight* tab at the top of the page. You'll be using that tab after you complete the next two actions.
313+
If you need detailed instruction, visit [Configure to Use Browser: *TestFlight* Users Overview](tf-users.md#testflight-users-overview){: target="_blank" }.
323314

324315
## Create Certificates
325316

@@ -394,29 +385,26 @@ Please do not remove an existing app if you have trouble building a new one. You
394385
For more information, see [Do Not Remove an App](bb-errors.md#do-not-remove-an-app){: target="_blank" }.
395386

396387

397-
## Add Users to *TestFlight* for App
398-
399-
Once the first build completes, you will be able to configure *TestFlight* for the app - follow the template for setting up *TestFlight* for Loop found in [Configure to Use Browser: *TestFlight* Users Overview](../browser/tf-users.md#testflight-users-overview).
400-
401388
## Install on Phone
402389

403390
The [Install on Phone](phone-install.md) walks you through the steps to install the app to a phone. When going through those steps, replace your App Name for&nbsp;_<span translate="no">Loop</span>_. Everything else is the same.
404391

405392
## Switch to a *GitHub* Organization Account
406393

407-
This section is optional. It is strongly recommended for anyone building more than one app.
394+
If you are already using an Organization account for building, no need to read this section - you are done with this page.
408395

409-
### Set up a Free *GitHub* Organization
396+
There are a number of folks who started using the Browser Build method when only the Personal account method was documented. This section is meant to assist them in switching to an Organization account.
410397

411-
Prerequisite: You need a personal *GitHub* account. If you do not already have a personal *GitHub* account, click on [New *GitHub* Account](secrets.md#new-github-account){: target="_blank" }.
398+
### Set up a Free *GitHub* Organization
412399

413400
Detailed instructions for creating an organization are found at [Create a Free *GitHub* Organization](secrets.md#create-a-free-github-organization){: target="_blank" }.
414401

415-
The directions below may be sufficient for some where you use your *GitHub* username instead of `my-name`.
402+
The directions below summarize that detailed section. Use your *GitHub* username instead of `my-name`.
403+
404+
> Prerequisite: You need a personal *GitHub* account. If you do not already have a personal *GitHub* account, click on [New *GitHub* Account](secrets.md#new-github-account){: target="_blank" }.
416405
417-
1. Follow the directions below to create a new *GitHub* organization account with a username of `my-name-org` (of course naming is up to you)
418-
* There is documentation at this link, [New *GitHub* Organization](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch){: target="_blank" }, or you can follow the bullets below
419-
* Log into `my-name` and click on your icon (at upper right) and choose Settings
406+
1. You will create a new *GitHub* organization account with a username of `my-name-org` (of course naming is up to you)
407+
* Log into your *GitHub* account (username `my-name`) and click on your icon (at upper right) and choose Settings
420408
* On the left side-bar, click on Organizations
421409
* In the new view, click on New Organization and choose Free for the plan by clicking on `Create a free organization`.
422410
* In the `Set up your organization` screen:
@@ -439,52 +427,41 @@ There are two steps to using this account moving forward:
439427
1. For each repository: you need to `fork` for each app you wish to build to the new `my-name-org` account
440428

441429
* When you do the fork, there will be a dropdown menu under Owner for you to select the account for the `fork`
430+
* For detailed directions with a GIF, see [Create the Fork](prepare-fork.md#create-the-fork){: target="_blank" }
442431
* Choose the organization account
443-
* Other than that extra step, follow the standard `fork` directions
444-
* This link provides instructions to [`Fork LoopWorkspace`](prepare-fork.md#fork-loopworkspace)
445-
* Refer to the [Table of App `Repositories`](#table-of-app-repositories) when building apps other than the *Loop* app
446-
447-
Then, for every build, you will use just the organization account. The original account is maintained to give you access to *GitHub* and holds your *GitHub* personal access token.
448-
449-
> WARNING - If you have `forks` of DIY apps in your original `my-name` account that are configured to build automatically, you want to disable that and have only the `my-name-org` account be configured for automatic building. Refer to [Disable Building for Personal *GitHub* account](#disable-building-for-personal-github-account).
432+
* Refer to the [Table of App `Repositories`](#table-of-app-repositories) when building apps other than the *Loop* app
450433

451434
### Add <code>Secrets</code> to your *GitHub* Organization
452435

453-
Adding the <code>Secrets</code> to an organization is similar to adding them to each <code>repository</code> for a personal *GitHub* account. The difference is you add them at the organization level and then they are available to each <code>repository</code> in that organization.
436+
You use the same `Secrets` and `Variable` that you have saved in your [Secrets Reference File](intro-summary.md#make-a-secrets-reference-file){: target="_blank" }.
454437

455-
Detailed instructions for using an organization are found at [Configure Secrets](prepare-fork.md#configure-secrets){: target="_blank" }.
438+
Detailed instructions for adding these to an organization are found at [Configure Secrets](prepare-fork.md#configure-secrets){: target="_blank" }.
456439

457440
The directions below may be sufficient for some.
458441

459-
Make sure you are in the organization for *GitHub*:
460-
461442
* Make sure the URL is `github.com/my-name-org`
462443
* Click on Settings
463444
* In the left pane, scroll down to find `Secrets and variables` and click on the dropdown symbol and choose `Actions`
464445
* At this point, tap on `New organization secret` and add your 6 secrets
465446
* Then tap on the `Variable` tab and enter your Variable
466447

467-
### Disable Building for Personal *GitHub* account
448+
### Build with Organization
468449

469-
Once you have your apps building as you expected from the `my-name-org` organization account, you should configure your personal account to stop any automatic building that may be taking place.
450+
For every build, you will use the repository in your organization account. Your personal account is maintained to give you access to *GitHub* and holds your *GitHub* personal access token.
470451

471-
#### Option 1: Delete `repository`
452+
If you previously built with your personal account, all the Identifiers and the App are already configured over at *Apple*. You simply Create Certificates and Build the app.
472453

473-
You can delete the DIY repositories from your personal account
454+
* If this is your first build of an app, then yes - you must do all the steps
455+
* If this is switching from personal account for building to organization account for building, then you are using your already configured Identifiers and App
456+
* New certificates must be created because those tie a particular *GitHub* username to the particular *Apple* developer ID and your organization username differs from your personal username
474457

475-
* Pro: You can't get confused about where you should be building
476-
* Cons:
477-
* If you have already generated some customizations there, it is safest to not delete the repository
478-
* If you have pull requests open from your personal account, DO NOT DELETE that repository - that would automatically close those open PR
479-
* Here are the instructions if you decide to delete the repositories
480-
* Click on your icon at upper right of *GitHub* browser
481-
* Select `Your Repositories`
482-
* Notice the github address now says `my-name` instead of `my-name-org`
483-
* Select the repository you wish to delete and follow these instructions
484-
* [GitHub Docs: Delete a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository){: target="_blank" }
458+
> WARNING - If you have `forks` of DIY apps in your original `my-name` account that are configured to build automatically, you want to disable building and have only the `my-name-org` account be configured for automatic building. Refer to [Disable Building for Personal *GitHub* account](#disable-building-for-personal-github-account).
459+
460+
### Disable Building for Personal *GitHub* account
485461

462+
Once you have your apps building as you expected from the `my-name-org` organization account, you should configure your personal account to stop any automatic building that may be taking place.
486463

487-
#### Option 2: Disable Build Action
464+
#### Option 1: Disable Build Action
488465

489466
You can disable the build actions from the repositories in your personal account
490467

@@ -495,5 +472,20 @@ You can disable the build actions from the repositories in your personal account
495472
* Select `Your Repositories`
496473
* Notice the github address now says `my-name` instead of `my-name-org`
497474
* Select the repository you wish to disable build actions for and follow these instructions
498-
* [GitHub Directions to Disable and Enable a Workflow](https://docs.github.com/en/actions/using-workflows/disabling-and-enabling-a-workflow#disabling-a-workflow){: target="_blank" }
499475
* It is the Build action that kicks off the update and build steps, so simply disabling the one action is sufficient
476+
* [GitHub Directions to Disable and Enable a Workflow](https://docs.github.com/en/actions/using-workflows/disabling-and-enabling-a-workflow#disabling-a-workflow){: target="_blank" }
477+
478+
#### Option 2: Delete `repository`
479+
480+
You can delete the DIY repositories from your personal account
481+
482+
* Pro: You can't get confused about where you should be building
483+
* Cons:
484+
* If you have already generated some customizations there, it is safest to not delete the repository
485+
* If you have pull requests open from your personal account, DO NOT DELETE that repository - that would automatically close those open PR
486+
* Here are the instructions if you decide to delete the repositories
487+
* Click on your icon at upper right of *GitHub* browser
488+
* Select `Your Repositories`
489+
* Notice the github address now says `my-name` instead of `my-name-org`
490+
* Select the repository you wish to delete and follow these instructions
491+
* [GitHub Docs: Delete a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository){: target="_blank" }

0 commit comments

Comments
 (0)