1. What you need
💻 A Mac
With the latest macOS that runs the current Xcode. (No Mac? See part 9.)
🍎 Apple Developer Program
Membership at developer.apple.com/programs (yearly fee) — needed to publish and for push notifications.
🌐 Your website
T Booking 1.2.0 or newer on https://. Set its address first — see Connect your website (the same file is used for iPhone).
2. Install the tools on the Mac (once)
- Xcode — install from the Mac App Store, open it once and let it install the extra components.
- Command line tools — in Terminal:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch - Flutter — download the macOS version from docs.flutter.dev, unzip to e.g.
~/development/flutterand add it to your PATH:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshrc source ~/.zshrc flutter doctorflutter doctormust show a green tick for Flutter and Xcode.
3. Prepare the project
Copy mobile-apps to the Mac (e.g. ~/projects/mobile-apps). For the passenger app:
cd ~/projects/mobile-apps/apps/tbooking
flutter pub get
flutter build ios --config-only
For the business app use apps/tbooking_business instead. The iOS libraries (Firebase, Google sign-in…) are Swift packages: Xcode downloads them automatically the first time — no CocoaPods needed.
4. Open in Xcode
open ios/Runner.xcworkspace
Open Runner.xcworkspace (white icon). The first time, Xcode shows “Fetching Swift Package Manager dependencies” for a few minutes — wait until it finishes before you build.
In Xcode's left sidebar select the blue Runner project, then the Runner target. The tabs General and Signing & Capabilities are where you set everything below.
5. Signing & capabilities
- Sign in — Xcode → Settings → Accounts → + → Apple ID of your developer account.
- Team — Runner target → Signing & Capabilities → tick Automatically manage signing → choose your Team.
- Bundle Identifier — change it to your own (unique, cannot change after publishing), e.g.:
com.yourcompany.booking (passenger app) com.yourcompany.booking.business (business app) - Capabilities — the project already contains Push Notifications (both apps) and Sign in with Apple (passenger app). With automatic signing Xcode registers them for your App ID. If Xcode shows a red error, press Try Again or add them with + Capability.
- Display name and version — General tab: Display Name (the name under the icon). The version comes from
pubspec.yaml(version: 1.0.0+1→ version 1.0.0, build 1); increase the build number for every upload.
The app icon and launch screen are already set from assets/icon/. To use your own, replace those images and run dart run flutter_launcher_icons and dart run flutter_native_splash:create in the app folder (see the Android guide).
6. Run on your iPhone
- Connect the iPhone with a cable and tap Trust on the phone.
- Developer Mode — on the iPhone: Settings → Privacy & Security → Developer Mode → On → restart.
- Run — in Xcode pick your iPhone at the top and press ▶ (or run
flutter runin Terminal). The first time, the iPhone may ask you to trust the developer in Settings → General → VPN & Device Management.
No iPhone? Choose an iOS Simulator in the device list — everything except push notifications and the camera scanner works there.
7. Build and upload to App Store Connect
- Create the app record — appstoreconnect.apple.com → Apps → + → New App → iOS, name, language, your Bundle ID, a SKU (any text).
- Build the IPA — in the app folder:
Result:flutter build ipa --releasebuild/ios/ipa/*.ipaand the archivebuild/ios/archive/Runner.xcarchive. - Upload — either open the archive in Xcode (Window → Organizer → select it → Distribute App → App Store Connect → Upload), or drag the
.ipainto Apple's free Transporter app and press Deliver.
Alternative inside Xcode: select Any iOS Device (arm64) at the top → Product → Archive → Distribute App.
8. TestFlight and App Store review
- TestFlight — after processing (5–30 minutes) the build appears under TestFlight. Add yourself as an internal tester and install with the TestFlight app.
- App information — privacy policy URL (your site's Privacy page), category (Travel), age rating.
- App Privacy — contact info and purchases are collected for app functionality, nothing is used for tracking (details in
mobile-apps/README.md). - Screenshots — 6.9" and 6.5" iPhone sizes (take them in the Simulator with ⌘ + S).
- App Review Information — give a working demo login (a customer account for T Booking, an operator account for the business app).
- Submit for review — choose the build → Add for Review.
Rules the apps already follow: tickets are a real-world service, so your own payment gateways are allowed (App Review Guideline 3.1.3(e)); Sign in with Apple is offered whenever Google sign-in is shown; account deletion is inside the app; export compliance is answered (standard HTTPS only).
Business app is for staff: you can ask Apple for Unlisted app distribution so it is only reachable by link. Its login screen explains that accounts are created by the site administrator.
9. No Mac? Build with Codemagic
The included codemagic.yaml builds both iPhone apps (and the Android apps) on Codemagic's Macs and uploads them to TestFlight.
- Put the code in a Git repository — upload the
mobile-appsfolder to a private GitHub, GitLab or Bitbucket repository. - Add the app at codemagic.io → Add application → choose the repository → it finds
codemagic.yaml. - App Store Connect API key — App Store Connect → Users and Access → Integrations → App Store Connect API → generate a key (App Manager). In Codemagic → Team settings → Integrations → Developer Portal → add it with the name
tbooking_asc. - Your website address — Codemagic → Environment variables → group
tbooking→ variableAPI_BASE_URL= your website. - Bundle IDs — if you changed them, update
bundle_identifierincodemagic.yaml. - Signing certificate — Codemagic → Team settings → Code signing identities → iOS certificates → Generate certificate (Apple Distribution, using the API key from step 3). Then iOS provisioning profiles → Fetch profiles and select the App Store profile of each Bundle ID (create them first at developer.apple.com → Profiles → + → App Store Connect, if none exist).
- Start a build → workflow T Booking · iPhone or T Booking Business · iPhone. Codemagic builds the IPA and sends it to TestFlight. Then continue with part 8.
10. If something goes wrong
| Problem | Solution |
|---|---|
| “No such module 'Flutter'” or missing packages | Run flutter pub get and flutter build ios --config-only in the app folder, open Runner.xcworkspace and wait for the Swift packages to download. In Xcode: File → Packages → Reset Package Caches. |
| “Signing requires a development team” | Choose your Team in Signing & Capabilities (part 5). |
| “Provisioning profile doesn't include the Push Notifications / Sign in with Apple capability” | Keep “Automatically manage signing” on and press Try Again, or enable the capability for your App ID at developer.apple.com → Identifiers. |
| “Minimum deployment target” | The project uses iOS 15. Run flutter clean and flutter pub get, then build again. |
| Upload rejected: build number already used | Increase the number after + in pubspec.yaml. |
| App shows “Something went wrong” | Check the website address and that the site uses https://. |