Build and TestFlight
This page ends with the pd build in TestFlight and the team testing it on real iPhones against the production API. Before you start, finish Apple account and app identity, and the pd backend must be ready as in Backend and demo account.
1. Build the pd iOS app
Section titled “1. Build the pd iOS app”The Expo project owner runs this in the app folder, because it needs the .p8 file in credentials/. It is a single command. The result is an IPA file (the iOS app file) signed for the App Store.
EXPO_ASC_API_KEY_PATH="$PWD/credentials/AuthKey_6D66TD78SA.p8" \EXPO_ASC_KEY_ID=6D66TD78SA \EXPO_ASC_ISSUER_ID=0d676072-ea6d-4a71-b1ba-09310428d89a \EXPO_APPLE_TEAM_ID=4B8DGJBFTA \EXPO_APPLE_TEAM_TYPE=COMPANY_OR_ORGANIZATION \eas build --profile pd --platform iosThe 5 variables in front tell EAS to use the API key instead of logging in with a password. The values come from steps 1 and 5 of the Apple account page.
--profile
Picks a set of values in eas.json, which decides which API the app points to and which Bundle ID it uses.
WhyOnly pd may be submitted for review. app.config.js stops the build right away if the API URL does not match the profile.
EXPO_APPLE_TEAM_TYPE
The team's Apple Developer account type.
WhyMust match Enrolled as on the Membership details page. If the account is still Individual, use INDIVIDUAL until Apple changes it.
The first time, EAS asks two questions about signing the app. Real output in Terminal:
✔ Incremented buildNumber from 2 to 3.✔ Using remote iOS credentials (Expo server)✔ Bundle identifier registered th.co.ricesense.app✔ Synced capabilities: No updates✔ Fetched Apple distribution certificates? Generate a new Apple Distribution Certificate? › (Y/n)? Generate a new Apple Provisioning Profile? › (Y/n)Generate a new Apple Distribution Certificate?
Lets EAS create the certificate that signs the app for the store and keep it on the Expo server.
WhyLet EAS handle everything so the team does not hold certificate files. If the team already has a certificate, EAS asks Reuse this distribution certificate? instead. Answer Y (image in iOS extras).
Generate a new Apple Provisioning Profile?
Lets EAS create the provisioning profile that ties the certificate to the Bundle ID.
WhySame reason as the certificate.
Wait 15 to 40 minutes. Follow progress from the expo.dev link the command prints, or run eas build:list. EAS bumps the build number (buildNumber, the number the store uses to tell builds of the same version apart; it must not repeat) every time, because autoIncrement is set. When it finishes, note the build ID from the build page on expo.dev.
2. Submit to App Store Connect
Section titled “2. Submit to App Store Connect”The Expo project owner runs this once the build finishes. The command reads the API key and the app’s Apple ID from submit.pd.ios in eas.json.
eas submit --profile pd --platform ios --id <build id>Build to submit
Tells EAS which build to send.
WhyNaming the build ID avoids sending the wrong one when the project has several builds.
Output in Terminal:
✔ Scheduled iOS submission✔ Submitted your app to Apple App Store Connect!Your binary has been successfully uploaded to App Store Connect!- It is now being processed by Apple - you will receive an email when the processing finishes.3. Wait for Apple to process the build
Section titled “3. Wait for Apple to process the build”Wait 5 to 30 minutes (Apple sends an email when done). Then the developer opens the app in App Store Connect → TestFlight tab and checks that processing is complete.
Build Uploads › Status
Whether Apple accepted the file.
We enteredComplete
WhyIf it does not show Complete, open it and read the warning. Do not build again until you know the cause.
Version › Status
The build's status in TestFlight.
We enteredReady to Submit
WhyA build can be tested for 90 days from upload. Expires in shows how many days are left. Missing Compliance means usesNonExemptEncryption was not set.
4. Create an internal testing group
Section titled “4. Create an internal testing group”The developer (Admin or App Manager role), in the TestFlight tab, clicks + next to INTERNAL TESTING → names the group → clicks Create. Done once per app.
Group Name
The tester group name, up to 50 characters.
We enteredRiceSense Internal
WhyAn internal group holds up to 100 people, and they must be users in the team's Users and Access. The group name can be changed later.
Enable automatic distribution
Whether every new build goes to this group on its own.
WhyA small team where everyone should always have the latest build. The dialog says this cannot be changed later. If you want the other setting, create a new group.
5. Invite testers who are not in the team yet
Section titled “5. Invite testers who are not in the team yet”Internal testers must be users in the team first. The Apple account holder or an Admin goes to Users and Access → People tab → clicks + → fills in the form → clicks Next. If everyone is already in the team, skip to step 6.
First Name / Last Name
The name shown in the team list.
We enteredRiceSense / Tester
WhyOnce the invitee accepts with their own Apple Account, the list shows the name from that account.
The email that receives the invitation. It must be the email of the Apple Account the person uses on their iPhone.
We enteredkiwt07@gmail.com
WhyAsk the person first which Apple Account email they use on the test device.
Roles
This user's permissions in App Store Connect.
WhyThis person is only a tester. Give only the permissions the work needs. Click See Permissions to see the permission table for each role.
Additional Resources
Extra permissions, such as Create Apps and Generate Individual API Keys.
WhyA tester does not need them.
Pick the apps this person can access → click Invite. The person must accept the email invitation before they can be added to a group.
Apps
The apps this user can see.
WhyIf the account holds apps for several clients, always tick apps one by one.
6. Add testers to the group
Section titled “6. Add testers to the group”The developer opens the group page (for example RiceSense Internal) → clicks + next to Testers → ticks names → clicks Add.
Tester list
Tick the people who will receive this group's builds.
We enteredTick everyone who needs to test, then click Add
WhyIf the person you want is not in the list, go back and invite them to the team in step 5.
Everyone in the group gets an invitation email and shows the status Invited.
7. Test on a real iPhone against production
Section titled “7. Test on a real iPhone against production”The tester installs the TestFlight app from the App Store on the iPhone → taps the link in the invitation email → taps Install, then tests at least the following, using the demo account prepared in Backend and demo account.
- Log in with the demo account, and every screen has data.
- Record an activity with a photo (the camera and photo library ask for permission with the messages you set).
- Chat with the AI assistant.
- Switch between Thai and English.
- The About screen shows the version number matching
app.json.
If there is a problem, the developer fixes it and the Expo project owner repeats steps 1 and 2. The new build joins the group on its own because automatic distribution is on.
Check before moving on
Section titled “Check before moving on”- The pd build is in the TestFlight tab with status Ready to Submit, with no Missing Compliance.
- The build’s Bundle ID is
th.co.ricesense.appwith no suffix. - At least one tester has installed from TestFlight and passed the tests in step 7.
- Note the build number that passed testing. You pick it on the version page in the next step.