Skip to content

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.

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.

Terminal window
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 ios

The 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.

  • pdOur choiceA file for the App Store, pointing to https://api.ricesense.com/api/v1 with Bundle ID th.co.ricesense.app.
  • dv / teAn internal distribution file (ad-hoc, meaning it installs directly only on registered devices), pointing to the dv or te API with a suffixed Bundle ID. Cannot be sent to the store.

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.

  • COMPANY_OR_ORGANIZATIONOur choiceFor accounts Enrolled as Organization.
  • INDIVIDUALFor accounts Enrolled as Individual.

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.

  • YesOur choiceEAS creates and stores it. Later builds reuse it without asking again.
  • NoYou must supply your own certificate to EAS, or the build cannot continue.

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.

  • YesOur choiceEAS creates and stores it.
  • NoYou must prepare the profile yourself.

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.

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.

Terminal window
eas submit --profile pd --platform ios --id <build id>

Build to submit

Tells EAS which build to send.

  • --id <build id>Our choiceSends the build with that build ID from expo.dev.
  • --latestSends the project's latest iOS build.
  • NeitherEAS asks in Terminal 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.

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.

The build is processed and ready in TestFlightApp Store Connect · 19 Nov 2026
The RiceSense TestFlight tab. Build Uploads shows 1.0.0 (3) with status Complete, and under Version 1.0.0 build 3 shows Ready to Submit, Expires in 78 days
1

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.

2

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.

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.

Create an internal testing groupApp Store Connect · 19 Nov 2026
The Create New Internal Group dialog with a Group Name field and a ticked Enable automatic distribution checkbox
1

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.

2

Enable automatic distribution

Whether every new build goes to this group on its own.

  • TickedOur choiceEvery newly uploaded build reaches everyone in the group automatically.
  • Not tickedYou add each build to the group by hand.

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.

Invite a new user to the teamApp Store Connect · 19 Nov 2026
The New User dialog with First Name RiceSense, Last Name Tester, Email kiwt07@gmail.com, the Customer Support role ticked, and an unticked Additional Resources section
1

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.

2

Email

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.

3

Roles

This user's permissions in App Store Connect.

  • Customer SupportOur choiceFew permissions. Can join internal testing groups but cannot change builds or see financial data.
  • Developer / App ManagerCan manage builds and app information, increasingly so. Give only to people who really do that work.
  • AdminCan do almost everything, including managing users and creating the team's API keys.

WhyThis person is only a tester. Give only the permissions the work needs. Click See Permissions to see the permission table for each role.

4

Additional Resources

Extra permissions, such as Create Apps and Generate Individual API Keys.

  • Not tickedOur choiceCannot create new apps or personal API keys.
  • TickedGets the extra permissions that are ticked.

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.

Pick the apps the new user can accessApp Store Connect · 19 Nov 2026
The App Access For RiceSense Tester dialog with the RiceSense app, Bundle ID th.co.ricesense.app, ticked, and an Invite button
1

Apps

The apps this user can see.

  • Tick only the relevant appsOur choiceSees only those apps.
  • Tick allSees every app in the list.

WhyIf the account holds apps for several clients, always tick apps one by one.

The developer opens the group page (for example RiceSense Internal) → clicks + next to Testers → ticks names → clicks Add.

Only team users can be addedApp Store Connect · 19 Nov 2026
The Add Testers to the Group RiceSense Internal dialog listing one person, email Admin@futureofgoodlife.com, name prasong lakboon, role Account Holder, Admin
1

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.

The group has 2 testers with status InvitedApp Store Connect · 19 Nov 2026
The RiceSense Internal group page with 2 testers, kiwt07@gmail.com and admin@futureofgoodlife.com, both with 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.

  • 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.app with 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.

Next: App Store Connect through review