The example app supports two Android flavors. iOS uses a single bundle ID (no flavors).
iOS bundle ID was NOT changed. It remains com.moyasar.coffeeFlutterVeryUnique (configured for Apple Pay). To run on iOS:
flutter run --flavor default_Or target iOS explicitly:
flutter run --flavor default_ -d <ios-device-id>| Platform | Bundle/Application ID |
|---|---|
| iOS | com.moyasar.coffeeFlutterVeryUnique (Apple Pay enabled) |
| Android | com.example.coffee_flutter |
flutter run --flavor default_| Platform | Bundle/Application ID |
|---|---|
| Android | com.mysr.spay (Samsung test service registered) |
flutter run --flavor spayUse a Samsung Android device; the Samsung Pay button appears when the SDK is ready.
For your own app, use one bundle identifier across platforms:
- Choose your bundle ID (e.g.
com.yourcompany.yourapp) - iOS: Set
PRODUCT_BUNDLE_IDENTIFIERin Xcode to your bundle ID - Android: Set
applicationIdinbuild.gradle(default_ flavor) to the same value - Apple Pay: Register your App ID with Apple Pay in Apple Developer Portal
- Samsung Pay: Register your package name in Samsung Pay Developer Portal
| Platform | default_ (Apple Pay) | spay (Samsung Pay Demo) |
|---|---|---|
| Android | com.example.coffee_flutter | com.mysr.spay |
| iOS | com.moyasar.coffeeFlutterVeryUnique | (iOS has no flavors; always uses this) |
When you run from Android Studio using the Run/Debug button without a flavor, you get:
Gradle build failed to produce an .apk file. It's likely that this file was generated under .../build, but the tool couldn't find it.
Fix: Add the flavor to the Run Configuration so the IDE passes it:
- Run → Edit Configurations…
- Select your Flutter run configuration (or create one for the
exampleapp). - In Additional run args (or Build flavor), add:
--flavor default_for Apple Pay / default, or--flavor spayfor Samsung Pay.
- Click Apply then OK.
After that, the Run/Debug button will use the chosen flavor and the APK will be found. (From the terminal, flutter run --flavor spay already works.)
Or use the pre-made run configs: The project includes two Run Configurations you can select from the dropdown next to the Run button:
- Flutter (default_) – Apple Pay / default flavor
- Flutter (spay) – Samsung Pay flavor
If you don’t see them, use Run → Edit Configurations… and add the flavor in Build flavor or Additional run args as above.
- Confirm bundle ID in Xcode:
Runner→ Target → General → Bundle Identifier =com.moyasar.coffeeFlutterVeryUnique - Run with default flavor:
flutter run --flavor default_(required when Android has product flavors) - Apple Pay capability: Ensure the App ID has Apple Pay enabled and the correct merchant ID in Apple Developer
- Entitlements:
Runner.entitlementsshould include your Apple Pay merchant ID