iPhone

Smart TMS – iPhone (iOS) App Documentation

App v1.0.0 · needs website v1.7+

Overview

Smart TMS is the customer app for the Smart TMS – Tailor Management System website. A tailoring shop's customers follow their orders, bills, quotations and visits on their phone. Shop owners and staff keep using the website. The app talks only to your website, so all data stays on your server.

One app for every shopYou publish the app once. Each shop is found by its company code or QR code, so a single store listing serves every shop on your website.
Shop brandingEach owner sets the app title, colour, logo and welcome text from Mobile App in the web app. Customers see the shop's branding before they sign in.
Same rules as the websiteOrders, bills, taxes, payments and permissions come from the website's own code. Every request is limited to the signed-in customer's own shop and own data.
Push notificationsThrough Firebase: order moved on, order ready, new bill, payment received, quotation, visit reminders and messages from the shop. Inbox with unread badge.
SecureToken kept in the phone's secure storage (90 days); HTTPS only in release builds; optional fingerprint / face / PIN lock.
Control from the super adminStore links, minimum app version, maintenance notice and an on / off switch for every shop.

What is in the package

Folder / fileWhat it is
iphone_app/customer_app/The Flutter project of the iPhone (iOS) app (package id com.smarttms.tmsCustomer), with its own ios/ folder, lib/ (code), test/ (77 automatic tests), docs/openapi.yaml (API contract) and assets/ (icon).
iphone_app/README.mdShort setup, build, push and publishing guide.

The website itself (Smart TMS SaaS, version 1.7 or newer) is sold separately and must run on an HTTPS domain. The app is an add-on.

Features

  1. Find the shop by typing its company code, scanning its QR code or opening an invite link
  2. Sign in with email and password, two-factor code, optional fingerprint / face / PIN lock
  3. Home: orders in progress and ready, amount to pay, overdue and quotation alerts, the next visit, quick actions
  4. Orders with filters and a production thread timeline (cutting, stitching, finishing, trial, ready), photos, link to the bill, public tracking link
  5. Billing: bills, payments so far, pay online; quotations you can accept or decline
  6. Visits: book a measurement, fitting, pickup or chat in half-hour slots; move or cancel
  7. Shop: garments and starting prices with photos; ask for a quotation
  8. Measurements on file, a how-to-measure guide, and your own measurements from home that the shop checks and keeps
  9. Reviews: rate a finished order; the shop can show kind words on its website
  10. Chat with the shop and an inbox with push notifications
  11. Profile: name, phone, photo, language, shop contact buttons, password, app lock, delete account
  12. Last pages kept for offline viewing

Not included

Requirements

Your computer (to build the app)

Phones that can run the app

Accounts

Website

Install Flutter & Xcode

  1. You need a Mac with the latest Xcode from the Mac App Store. iPhone apps cannot be built on Windows or Linux.
  2. Install the Flutter SDK (3.27 or newer) from docs.flutter.dev and add flutter/bin to your PATH.
  3. Install CocoaPods: sudo gem install cocoapods (or brew install cocoapods).
  4. Run flutter doctor and fix every line that is not a green tick for Xcode.
  5. An Apple Developer Program membership (about 99 USD a year) is needed to publish.

Prepare the website

  1. Log in as the super admin and open Mobile App in the menu. Paste the store links (later), set the minimum app version (leave empty for none), a default colour and a welcome text.
  2. Log in as a shop owner and open Mobile App. You see the company code, the QR code and the invite link. Fill in the app title, colour, logo and which parts customers can see. Use New code if a code ever leaks.
  3. On the owner's Website, the Get our app block shows the QR code and the store buttons (it is on the home page of new websites; add it to older pages from Edit pages). It is also at /site/<shop>/app.
  4. Open https://your-website.com/api/v1/company/<code> in a browser. You should see the shop's JSON branding. If you do, the app will work.

Set up the project

  1. Unzip smart-tms-iphone-v1.0.0.zip and open a terminal in iphone_app/customer_app.
  2. flutter pub get
  3. Optional but recommended, check everything works before touching anything:
    flutter analyze
    flutter test
  4. Choose your own bundle identifier instead of com.smarttms.tmsCustomer:
    In Xcode: Runner target → General → Bundle Identifier.
  5. Set the website address. Either pass it when you run / build (--dart-define=API_BASE_URL=https://your-website.com), or leave it out and the first screen asks for the address (handy for testing).

Run on a phone or simulator

Run flutter devices to see what is connected.

On the simulator

open -a Simulator
flutter run --dart-define=API_BASE_URL=https://your-website.com

The simulator reaches a website on your Mac at http://localhost. The camera (QR scan) is not available in the simulator: type the company code instead.

On a real iPhone

  1. Connect the iPhone, unlock it and tap Trust. Turn on Developer Mode (Settings → Privacy & Security).
  2. Open ios/Runner.xcworkspace in Xcode, select the Runner target → Signing & Capabilities → choose your Team and set your own Bundle Identifier.
  3. flutter run --dart-define=API_BASE_URL=https://your-website.com

Debug builds accept plain http:// for testing. Release builds need HTTPS.

Which account to sign in with

Use a customer account of a shop (a user of type customer), with that shop's company code. Owner and staff accounts are not accepted by the app. A wrong password and a wrong shop give the same message.

Branding & customisation

Changes that need no new build (from the website)

Changes in the code (then build again)

WhatWhere
App name in the codelib/config.dart (AppConfig(appName: 'Smart TMS'))
Launcher nameios/Runner/Info.plist (CFBundleDisplayName)
IconReplace assets/icon.png and assets/icon_foreground.png, then dart run flutter_launcher_icons
Look (colours, cards, fonts)lib/util/theme.dart (the "atelier" theme)
Screenslib/screens/

The app's own screens are in English. The shop's messages (order updates, server errors) follow the language each customer picks in their profile.

Push notifications (Firebase)

Optional. Without it everything works and the in-app inbox still fills up; only the phone pop-ups are missing.

  1. Create a project in the Firebase console and add an iOS app with your bundle identifier.
  2. Download GoogleService-Info.plist and add it to ios/Runner in Xcode (tick Copy items if needed).
  3. Upload your APNs key (.p8) in Firebase: Project settings → Cloud Messaging → Apple app configuration.
  4. Server: Project settings → Service accounts → Generate new private key. Save the JSON on the server (outside the web folder) and set in .env:
    FCM_CREDENTIALS=/full/path/to/service-account.json

When customers are notified

Customers who never installed the app get no inbox items.

Version numbers

Change the number in pubspec.yaml (version: 1.0.0+1): the part before + is the version people see, the number after is the build number that must grow with every upload.

The super admin can force an update from Mobile App → Minimum app version: older apps then show an "update required" screen.

Signing & capabilities

  1. In Xcode open ios/Runner.xcworkspace → Runner target → Signing & Capabilities. Choose your Team, keep Automatically manage signing on and set your own Bundle Identifier.
  2. Add the capability Push Notifications and Background Modes → Remote notifications.
  3. For https invite links add Associated Domains with applinks:your-website.com (see Invite links).
  4. In the Apple Developer site create an App ID for your bundle identifier, and (for push) an APNs key.

Build the release

cd iphone_app/customer_app
flutter pub get
cd ios && pod install && cd ..
flutter build ipa --release --dart-define=API_BASE_URL=https://your-website.com

The archive is created in build/ios/archive/. Open it in Xcode (Window → Organizer) and choose Distribute App → App Store Connect → Upload.

Always pass your HTTPS address with --dart-define=API_BASE_URL=... for a release, or customers will be asked for the address.

Publish on the App Store

1. Developer account

Join the Apple Developer Program.

2. Create the app in App Store Connect

My Apps → + → New App. Name Smart TMS (or your own), bundle id = your Bundle Identifier, SKU any text.

3. Store listing

4. App privacy

See Privacy & data safety.

5. Upload and submit

Upload the build from Xcode, wait until it shows in TestFlight, test it, then choose it under App Store → Build and Submit for Review.

Review note: Apple needs a way to sign in. In App Review Information give a demo company code and a demo customer's email and password.

After it is live, copy the App Store link into Super admin → Mobile App → iPhone store link.

Privacy & data safety

The app sends data only to your website. It has no ads and no third-party analytics. Firebase is used only to deliver notifications.

DataWhyRequired
Name, email, phoneAccount and the shop's contact with the customerYes
Orders, bills, quotations, visits, measurementsThe app's purposeYes
Messages with the shopChatYes
Profile photoOptionalNo
Device tokenPush notificationsOptional

Customers can delete their account in the app (Profile → Delete account). Say this in the store forms.

iPhone permissions used

Info.plist keyWhy
NSCameraUsageDescriptionScan the shop's QR code, take a profile photo.
NSPhotoLibraryUsageDescriptionChoose a profile photo.
NSFaceIDUsageDescriptionOptional Face ID lock.

Code structure

lib/
  main.dart, config.dart, core.dart   start-up, app name, shared imports
  api/        API client, repository and models
  state/      sign-in, cache, connectivity, push, deep links
  util/       theme, formatting, app config
  screens/    home, orders, billing, visits, shop, measurements, chat ...
  widgets/    floating tab bar, stitched cards, garment drawings, thread timeline
test/         unit and screen tests (offline, fake server)
docs/         openapi.yaml (API contract)
assets/       app icon

API reference

The app uses /api/v1 on your website with Laravel Sanctum bearer tokens (ability customer, 90 days). The full contract is in docs/openapi.yaml.

CallPurpose
GET /api/v1/company/{code}Shop branding by company code (no sign-in)
POST /api/v1/auth/loginSign in with company code, email, password
GET /api/v1/customer/dashboardHome data
/api/v1/customer/orders, quotations, invoices, appointments, measurements, catalogue, messagesLists and actions (each can be hidden per shop)

Platform rules: 426 update_required below the minimum version (the app sends X-App-Version), 503 during maintenance, 403 app_disabled when the shop's app is off.

Updating to a new version

  1. Update the website first and run php artisan migrate.
  2. Copy your changes (see Branding) into the new project, or copy the new lib/ over yours.
  3. Raise the version in pubspec.yaml, run flutter pub get, flutter test and build again.

Troubleshooting

ProblemWhat to do
flutter doctor shows a red crossFix that line first; most problems come from missing Xcode set-up, CocoaPods or signing.
"Company not found"Check the code on the owner's Mobile App page and that the shop's app is switched on by the super admin.
Cannot connect / handshake errorUse https:// with a valid certificate in release builds. For a local website use http://localhost/... in the simulator (debug only).
"Update required"The minimum version is higher than the app's. Lower it, or install the new build.
Wrong password messageThe email must belong to a customer of that shop. Another shop's account gives the same message.
No push notificationsCheck GoogleService-Info.plist, the APNs key and the Push capability, the server's FCM_CREDENTIALS path, and that the phone allowed notifications.
QR scan does nothingAllow the camera. Or type the company code.
Build fails: PodsRun flutter clean, then cd ios && pod repo update && pod install.

FAQ

Do I need a separate app for every shop?

No. One app serves all shops on your website; customers pick theirs with the code or QR.

Can I make an app only for one shop?

Yes: set your own name, icon and bundle identifier, build and publish it under your own account. The shop's branding still comes from the website.

Can staff or the owner use it?

No, it is a customer app. Staff use the website.

Do customers need to register?

The shop creates the customer account (Customers in the website). The customer signs in with that email and password.

Where do customers pay?

The app opens the shop's secure payment page already signed in. The payment methods are the ones the shop set up on the website.

Support & changelog

Support covers installation questions, bugs and help with the steps in this guide. Customisations (new features, design changes) are not included but can be ordered separately. Create a support ticket here.

Changelog

VersionDateChanges
1.0.0November 2026First release: company code / QR sign-in, shop branding, home, orders with thread timeline, bills and online payment, quotations, visits and booking, shop and quotation requests, measurements incl. your own from home, reviews, chat, notifications inbox and push, app lock, offline cache.