Skip to content

Add flutter build ipa --no-codesign flag#101766

Merged
fluttergithubbot merged 2 commits intoflutter:masterfrom
jmagman:ipa-no-codesign
Apr 12, 2022
Merged

Add flutter build ipa --no-codesign flag#101766
fluttergithubbot merged 2 commits intoflutter:masterfrom
jmagman:ipa-no-codesign

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Apr 12, 2022

Move the --no-codesign flag from BuildIOSCommand to its base class _BuildIOSSubCommand so it can also be used by BuildIOSArchiveCommand.

When flag is set, skip the IPA creation step since that cannot be built without the codesigning settings.

$ flutter build ipa --export-method development --no-codesign

💪 Building with sound null safety 💪

Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Archiving io.flutter.examples.gallery...
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.
Running Xcode build...
 └─Compiling, linking and signing...                      2,967ms
Xcode archive done.                                         32.8s
Built /Users/magder/Projects/flutter/dev/integration_tests/flutter_gallery/build/ios/archive/Flutter Gallery.xcarchive.
Codesigning disabled with --no-codesign, skipping IPA.

Also, while we're here, rearrange the Building with sound null safety message to happen before the build starts so it isn't just randomly printed at the end. Before that change it looked like:

Built /Users/magder/Projects/flutter/dev/integration_tests/flutter_gallery/build/ios/archive/Flutter Gallery.xcarchive.

💪 Building with sound null safety 💪

Codesigning disabled with --no-codesign, skipping IPA.

Fixes #101765

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. a: release Challenges faced when attempting to productionize an app labels Apr 12, 2022
@jmagman jmagman self-assigned this Apr 12, 2022
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the 💪 Building with sound null safety 💪 that I moved to before super.runCommand() which actually does the building.

Future<FlutterCommandResult> runCommand() async {
final FlutterCommandResult xcarchiveResult = await super.runCommand();
final BuildInfo buildInfo = await getBuildInfo();
final BuildInfo buildInfo = await cachedBuildInfo;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been the late final cachedBuildInfo so getBuildInfo() isn't called twice.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 6ccd993 into flutter:master Apr 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 13, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 13, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 13, 2022
@jmagman jmagman deleted the ipa-no-codesign branch May 4, 2022 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: release Challenges faced when attempting to productionize an app platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flutter build ipa --no-codesign flag

3 participants