T BookingDOCUMENTATION

Build the iPhone apps

The same Flutter code builds the iPhone and iPad versions of both apps. Build them on a Mac with Xcode — or in the cloud with Codemagic if you have no Mac.

Flutter 3.47+Xcode (latest)Apple Developer ProgramiOS 15 or newer
On this page
  1. What you need
  2. Install the tools on the Mac
  3. Prepare the project
  4. Open in Xcode
  5. Signing & capabilities
  6. Run on your iPhone
  7. Build and upload to App Store Connect
  8. TestFlight and App Store review
  9. No Mac? Build with Codemagic
  10. If something goes wrong

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)

  1. Xcode — install from the Mac App Store, open it once and let it install the extra components.
  2. Command line tools — in Terminal:
    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -runFirstLaunch
  3. Flutter — download the macOS version from docs.flutter.dev, unzip to e.g. ~/development/flutter and add it to your PATH:
    echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
    flutter doctor
    flutter doctor must 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

  1. Sign in — Xcode → Settings → Accounts → + → Apple ID of your developer account.
  2. Team — Runner target → Signing & Capabilities → tick Automatically manage signing → choose your Team.
  3. 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)
  4. 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.
  5. 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

  1. Connect the iPhone with a cable and tap Trust on the phone.
  2. Developer Mode — on the iPhone: Settings → Privacy & Security → Developer Mode → On → restart.
  3. Run — in Xcode pick your iPhone at the top and press ▶ (or run flutter run in 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

  1. Create the app record — appstoreconnect.apple.com → Apps → + → New App → iOS, name, language, your Bundle ID, a SKU (any text).
  2. Build the IPA — in the app folder:
    flutter build ipa --release
    Result: build/ios/ipa/*.ipa and the archive build/ios/archive/Runner.xcarchive.
  3. Upload — either open the archive in Xcode (Window → Organizer → select it → Distribute App → App Store Connect → Upload), or drag the .ipa into 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

  1. TestFlight — after processing (5–30 minutes) the build appears under TestFlight. Add yourself as an internal tester and install with the TestFlight app.
  2. App information — privacy policy URL (your site's Privacy page), category (Travel), age rating.
  3. App Privacy — contact info and purchases are collected for app functionality, nothing is used for tracking (details in mobile-apps/README.md).
  4. Screenshots — 6.9" and 6.5" iPhone sizes (take them in the Simulator with ⌘ + S).
  5. App Review Information — give a working demo login (a customer account for T Booking, an operator account for the business app).
  6. 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.

  1. Put the code in a Git repository — upload the mobile-apps folder to a private GitHub, GitLab or Bitbucket repository.
  2. Add the app at codemagic.io → Add application → choose the repository → it finds codemagic.yaml.
  3. 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.
  4. Your website address — Codemagic → Environment variables → group tbooking → variable API_BASE_URL = your website.
  5. Bundle IDs — if you changed them, update bundle_identifier in codemagic.yaml.
  6. 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).
  7. 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

ProblemSolution
“No such module 'Flutter'” or missing packagesRun 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 usedIncrease the number after + in pubspec.yaml.
App shows “Something went wrong”Check the website address and that the site uses https://.