The current implementation of macOS flavor support (#119564) assumes a bundle directory that differs from both the iOS implementation and the official documentation. The [documentation](https://docs.flutter.dev/deployment/flavors) instructs developers to suffix their Xcode build configurations with `-<flavor>`, but the implementation assumes a space:
5fd9ef4240/packages/flutter_tools/lib/src/macos/application_package.dart (L174-L178)
Whereas the iOS implementation, which is the reference for the docs, assumes a `-<flavor>` suffix:
a257efc284/packages/flutter_tools/lib/src/ios/xcodeproj.dart (L482-L488)
This change replaces the empty space with the `-` character which is in line with the documentation and iOS implementation, as well as removing the sentence-casing applied to the flavor name; every bundle built with a flavor keeps the original flavor name in its filename.
*List which issues are fixed by this PR. You must list at least one issue.*
#122684.
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
* Add new macos target configured for flavors
* Rename Free App copy-Info.plist to Free App Info.plist
* Remove bogus entitlements
* Remove Generated.xcconfig
* Audit project.pbxproj
* Remove unused configs
* share one info.plist
* Modify scheme so that paid app works
* Codesign automatic
* Pipe flavor as scheme into xcodebuild
* Ignore incoming flavor string
* pipe flavor for flutter run to work
* Add devicelab tests
* Error if host and target device are same for flutter install desktop
* Avoid bang (!) by promoting a local.
Co-authored-by: Jenn Magder <magder@google.com>
* Add supportsInstall property
* Override in test classes
* Add install test on macOS
* Refactor application_package and add tests for package directory
Co-authored-by: a-wallen <stephenwallen@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
* [flutter_tools] Support zipped application bundles for macOS
It is not possible to directly produce a directory (.app) in some build systems
but rather it must be zip'ed before being passed to the tool for
running. This adds support for attempting to extract an application
bundle from a zip file if the bundle is not already a directory. This
uses very similar code from lib/src/application_package.dart which is
used for extracting an ipa for iOS.
This introduces tests for the macos/application_package.dart behavior which did not exist before. These tests cover the changes in the PR and some of the existing behavior, but do not cover everything in that file.