Go4Food Go4Food Docs v1.0.0
Step 4 · Mobile Apps

iPhone Release (Xcode & App Store)

Signing, capabilities, sign-in values, the push key and the App Store upload. Do it on a Mac for each app.

45 min

You need a Mac with the latest Xcode and CocoaPods, and an Apple Developer account (paid yearly), which is required to run on a real iPhone, for push notifications and for the App Store. The apps support iOS 15.0 and newer. Repeat this page for customer, restaurant and driver.

Install the pods and open Xcode#

cd customer
flutter pub get
cd ios
pod install

Always open ios/Runner.xcworkspace (not Runner.xcodeproj).

Signing team and bundle ID#

Select the Runner target → Signing & Capabilities. Tick Automatically manage signing, pick your Team, and set your Bundle Identifier (the demo uses com.go4food.user, com.go4food.vendor and com.go4food.rider). It must match the iOS app in Firebase (package names). Do the same for the RunnerTests target (its ID ends with .RunnerTests).

Check the capabilities#

They are already in the project. If one is missing, add it with + Capability.

CapabilityCustomerRestaurantDriver
Push Notifications✓✓✓
Sign in with Apple✓✓✓
Background Modes → Remote notifications✓✓✓
Background Modes → Background fetch✓✓
Background Modes → Location updates✓

Apple requires Sign in with Apple whenever Google sign-in is offered, so keep Apple enabled in Firebase Authentication too (Authentication).

Connect Firebase and add the Google sign-in values#

Running flutterfire configure in the app folder writes ios/Runner/GoogleService-Info.plist (Connect with FlutterFire). Turn on Google sign-in in Firebase first, or the file has no CLIENT_ID. Then copy two values from it into ios/Runner/Info.plist, replacing the demo values:

Info.plist entryValue from GoogleService-Info.plist
GIDClientIDCLIENT_ID (ends with .apps.googleusercontent.com)
CFBundleURLTypes → CFBundleURLSchemesREVERSED_CLIENT_ID (starts with com.googleusercontent.apps.)
customer/ios/Runner/Info.plist
<key>CFBundleURLSchemes</key>
<array>
    <string>com.googleusercontent.apps.YOUR-REVERSED-CLIENT-ID</string>
</array>
...
<key>GIDClientID</key>
<string>YOUR-CLIENT-ID.apps.googleusercontent.com</string>

Upload the push key (APNs)#

Apple Developer → Certificates, IDs & Profiles → Keys → +. Tick Apple Push Notifications service (APNs), register and download the .p8 file (you can download it only once). Then in Firebase: Project settings → Cloud Messaging → Apple app configuration → Upload for each iOS app, with the Key ID and your Team ID. One key works for all three apps. Details: Push keys & setup.

Change the permission texts#

ios/Runner/Info.plist holds the texts iOS shows when the app asks for permission. They mention "Go4Food": write them for your brand.

KeyAsked when
NSLocationWhenInUseUsageDescriptionThe app uses location while open
NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationAlwaysUsageDescriptionBackground location (driver during a delivery)
NSCameraUsageDescriptionTaking a photo (profile, food, documents)
NSPhotoLibraryUsageDescription, NSPhotoLibraryAddUsageDescriptionPicking or saving pictures
NSBluetoothAlwaysUsageDescription (restaurant only)Connecting a receipt printer

App Review rejects empty or vague texts. For the driver app, explain background location in the review notes.

Run on an iPhone#

flutter devices
flutter run -d "Your iPhone"

On the first run, open Settings → General → VPN & Device Management on the iPhone and trust your developer certificate, and turn on Developer Mode if iOS asks.

Build and upload#

Raise version: in pubspec.yaml (1.0.0+1 → 1.0.1+2; the number after + must go up for every upload). Create the app in App Store Connect with the same bundle ID, then:

flutter build ipa --release

Upload build/ios/ipa/*.ipa with Apple's Transporter app, or open build/ios/archive/Runner.xcarchive in Xcode → Distribute App. Test with TestFlight, then submit for review.

Test push on a real iPhone

The Simulator does not receive push notifications. Test order alerts on a real device.

ProblemFix
pod install failspod repo update, then pod install. Still failing? Delete ios/Pods and ios/Podfile.lock and try again.
"No profiles for…"Pick your Team and use your own bundle ID, not com.go4food.*.
Google sign-in closes at onceGIDClientID or the URL scheme does not match your GoogleService-Info.plist.
Phone (OTP) sign-in fails on iPhoneUpload the APNs key and test on a real device. If the error asks for a custom URL scheme, add your iOS app ID as one more URL scheme in Info.plist: app- in front and every : changed to -, so 1:123456:ios:abc becomes app-1-123456-ios-abc.
No push on iPhoneUpload the APNs key for that app in Firebase and test on a real device.