Skip to content

Commit bd15f96

Browse files
marionbarkerJonas Björkert
andauthored
Include Instructions to Upload to TestFlight from a script (#1074)
* Add updated words for uploading to TestFlight from a script * Add screenshots for uploading to TestFlight from a script * Fix duplicated word in TestFlight script step --------- Co-authored-by: Jonas Björkert <j.bjorkert@nightscoutfoundation.org>
1 parent 8738ad8 commit bd15f96

4 files changed

Lines changed: 64 additions & 0 deletions

File tree

163 KB
Loading
288 KB
Loading
117 KB
Loading

‎docs/build/testflight-xcode.md‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,72 @@ There are several different methods for making use of *TestFlight*:
44

55
* Test an app someone else is developing
66
* Use the [Build with Browser](../browser/bb-overview.md) method to build and distribute your Loop app to your iPhone or that of a family member
7+
* Use any of the [build or customization scripts](#use-scripts-to-upload-to-testflight) and choose the "Upload to TestFlight" option
78
* Use *TestFlight* as a remote distribution (and backup) for an app you build using *Xcode*
89

10+
## Use Scripts to Upload to TestFlight
11+
12+
The Loop and Learn build scripts can now send your app straight to TestFlight. You build on your Mac just like before, and then install the app on the phone with the TestFlight app, the same way Browser Build users do. You don't need to plug the phone in.
13+
It works for Loop, Trio, LoopFollow, LoopCaregiver and xDrip4iOS. The Customization Select menu has the option too, for Loop.
14+
15+
### How it compares to what you already do
16+
17+
It's a mix of the two: built on your Mac like [Mac-Xcode Build](build-app.md#build-select-script){: target="_blank" }, delivered through TestFlight like [Browser Build](../browser/bb-overview.md){: target="_blank" }.
18+
19+
| | Xcode<br>(build script) | Browser Build<br>(GitHub) | Build script + TestFlight<br>(new) |
20+
|:--|:--|:--|:--|
21+
| Where the app is built | Your Mac | GitHub's computers | Your Mac |
22+
| Paid Apple Developer account | Optional | Required | Required |
23+
| How long the app lasts | 1 year (paid)<br>7 days (free) | 90 days | 90 days |
24+
| Setup Work | Xcode on a Mac | GitHub Account, Secrets, on-time-setup | Xcode on a Mac |
25+
26+
### Why you might want it
27+
28+
* **Your Mac is older than your phone.** Installing over a cable needs an Xcode version that supports the phone's iOS, and an older Mac may not be able to run it. TestFlight doesn't care which iOS the phone has. Apple does still require a fairly recent Xcode for uploads.
29+
* **No cable needed.** New versions reach your child's phone, or a caregiver's, wherever it is.
30+
* **Works alongside Browser Build.** Both can upload the same app without clashing.
31+
* **No GitHub setup.** You get TestFlight without GitHub, secrets or Actions.
32+
33+
### What you need
34+
35+
* A Mac with Xcode, which you already have if you build with the script today. Make sure your Apple ID is signed in under Xcode → Settings → Accounts.
36+
* A **paid** Apple Developer account. TestFlight doesn't work with a free account.
37+
* Apple updates its License Agreement for the Developer Program frequently. You need to [login to your developer account](https://developer.apple.com/account/) to manually check if there is a new agreement to accept. A pending agreement blocks uploads.
38+
* The TestFlight app on the phone that will install the app.
39+
40+
### Step by step
41+
42+
1. **Run the build script as usual.** Pick your app and answer the questions like always. At the end you'll see a new question: how do you want to install the app? Type 2 for TestFlight and press return.
43+
44+
![select upload to TestFlight](img/upload-to-testflight-option.png){width="700"}
45+
{align="center"}
46+
47+
2. **Let it build and upload**. The script builds the app, which usually takes 10 to 30 minutes, and then uploads it to Apple. When both steps show a green check mark, you're done at the Mac.
48+
49+
![building display when you choose upload to TestFlight](img/build-for-upload-to-testflight.png){width="700"}
50+
{align="center"}
51+
52+
3. **First time only:** let Xcode register the app. If Apple doesn't know about this app yet (for example, you've never used Browser Build for it), the script opens Xcode and shows four steps to follow. The app name must be unique across the whole App Store, so use the name the script suggests. You only do this once.
53+
54+
![first time upload to TestFlight](img/first-time-upload-to-testflight.png){width="700"}
55+
{align="center"}
56+
57+
4. **Wait for Apple.** Apple processes each new build before it shows up in TestFlight. That usually takes 5 to 30 minutes.
58+
5. **First time only: set up your TestFlight group.** Add yourself and anyone else who will install the app on a phone. If you use Browser Build, you've done this already. [LoopDocs: Configure TestFlight Group](../browser/tf-users.md#configure-testflight-group-for-the-app){: target="_blank" }
59+
6. **Install on the phone.** Open TestFlight on the phone and tap Install or Update. [LoopDocs: Install with TestFlight](../browser/phone-install.md){: target="_blank" }
60+
61+
### Good to know
62+
63+
* **TestFlight builds expire after 90 days.** An expired app won't open, so automation stops. Set a calendar reminder to build again well before then, and keep a backup plan for diabetes care.
64+
* **Xcode is still there.** Option 1 opens Xcode exactly as before.
65+
* **If the upload fails,** the script lists the usual causes and opens Xcode so you can retry and see a clearer error.
66+
* **Need help?** You can [get help from your favorite site for build help](../intro/loopdocs-how-to.md#how-to-ask-for-help){: target="_blank" }
67+
68+
69+
## Manual Method to Upload to TestFlight
70+
71+
Before there was a script, the manual method was developed and instructions provided on this page. Using the script method is far easier, but we're keeping these instructions for historical reasons.
72+
973
This guide can also be followed to install other apps you build with *Xcode* via *TestFlight*. Examples include <code>LoopFollow</code>, <code>LoopCaregiver</code> and <code>xDrip4iOS</code>.
1074

1175
Some useful features of using *TestFlight* to install Loop:

0 commit comments

Comments
 (0)