You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ flutter build ios -t lib/main_staging.dart --flavor=staging --release
...
$ flutter install --device-id=nnn
The Xcode project defines schemes: local, prod, staging
You must specify a --flavor option to select one of the available schemes.
$ flutter install --device-id=nnn --flavor=staging
Could not find an option named "flavor".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
I tried running flutter build ios -t lib/main_staging.dart --flavor=staging --release and then immediately installing manually with XCode. This installed the app with a Flutter DEBUG build. It did use the proper Xcode profile.
Thanks for the report. Tried the same scenario using flavors_example app in which getting same error as reported:
dhs@Dhss-MacBook-Pro flavors_example % flutter build ios -t lib/main_staging.dart --flavor=staging --release
Downloading ios tools... 7.6s
Downloading ios-profile tools... 5.5s
Downloading ios-release tools... 26.0s
Target file "lib/main_staging.dart" not found.
dhs@Dhss-MacBook-Pro flavors_example % flutter build ios -t lib/main_dev.dart --flavor=staging --release
Running "flutter pub get" in flavors_example... 1,575ms
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
The Xcode project defines schemes: dev, Runner
You must specify a --flavor option to select one of the available schemes.
dhs@Dhss-MacBook-Pro flavors_example % flutter install --device-id=21150b119064aecc249dfcfe05e259197461ce23 --flavor=dev
Could not find an option named "flavor".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
dhs@Dhss-MacBook-Pro flavors_example %
stable, master flutter doctor -v
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-x64, locale
en-GB)
• Flutter version 2.10.3 at /Users/dhs/documents/fluttersdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7e9793dee1 (11 hours ago), 2022-03-02 11:23:12 -0600
• Engine revision bd539267b4
• Dart version 2.16.1
• DevTools version 2.9.2
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.11.0-0.0.pre.795, on macOS 12.2.1 21D62
darwin-x64, locale en-GB)
• Flutter version 2.11.0-0.0.pre.795 at
/Users/dhs/documents/fluttersdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 78039ea4f3 (2 hours ago), 2022-03-06 21:51:15 -0500
• Engine revision 1875f0ad3f
• Dart version 2.17.0 (build 2.17.0-181.0.dev)
• DevTools version 2.11.1
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
This is definitely confusing. flutter install is trying to figure out where the prebuilt binary is, and to do that it tries to get the FULL_PRODUCT_NAME from your Xcode build settings. But to do that it needs to know the right configuration (flavor) to use.
Also flutter install should add --use-application-binary like drive and run so it doesn't need to rebuild the app.
While it doesn't fix the issue of the warning instructing to use a non-existent --flavor flag, #101324 will at least make installing a flavored IPA possible
$ flutter build ipa --flavor free --export-method ad-hoc
Archiving dev.flutter.flavors.free...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Automatically signing iOS for device deployment using specified development team in Xcode project: S8QB4VV633
Running Xcode build...
└─Compiling, linking and signing... 4.0s
Xcode archive done. 17.4s
Built /Users/m/Projects/flutter/dev/integration_tests/flavors/build/ios/archive/Free App.xcarchive.
💪 Building with sound null safety 💪
Building ad-hoc IPA... 6.3s
Built IPA to /Users/m/Projects/flutter/dev/integration_tests/flavors/build/ios/ipa.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
mleonhard commentedon Mar 5, 2022
I tried running
flutter build ios -t lib/main_staging.dart --flavor=staging --releaseand then immediately installing manually with XCode. This installed the app with a Flutter DEBUG build. It did use the proper Xcode profile.mleonhard commentedon Mar 5, 2022
To work around Flutter's broken tooling:
flutter build ios -t lib/main_staging.dart --flavor=staging --releaseflutte run.+button and select the app file created byflutter build:build/ios/iphoneos/RunnerRunner.app/but the selection dialog displays it asRunner.darshankawar commentedon Mar 7, 2022
Thanks for the report. Tried the same scenario using
flavors_exampleapp in which getting same error as reported:stable, master flutter doctor -v
darshankawar commentedon Mar 7, 2022
/cc @jmagman
jmagman commentedon Mar 31, 2022
This is definitely confusing.
flutter installis trying to figure out where the prebuilt binary is, and to do that it tries to get theFULL_PRODUCT_NAMEfrom your Xcode build settings. But to do that it needs to know the right configuration (flavor) to use.Also
flutter installshould add--use-application-binarylikedriveandrunso it doesn't need to rebuild the app.jmagman commentedon Apr 6, 2022
While it doesn't fix the issue of the warning instructing to use a non-existent
--flavorflag, #101324 will at least make installing a flavored IPA possibleAnd
jmagman commentedon Oct 25, 2022
cc @a-wallen @christopherfujino who were looking at a similar issue for
create.christopherfujino commentedon Oct 25, 2022
note to self: I think the right fix here would be to implement
--flavorforflutter install.github-actions commentedon Nov 23, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.