Save a provisioning profile to flutter config for manual code-signing (#164984)
This adds the ability to save a provisioning profile to the flutter config. It introduces a flag `flutter config --select-ios-signing-settings` which prompts the user to select either Automatic or Manual code-signing and then select a code-signing identity/cert for Automatic or a provisioning profile for Manual. Fixes https://github.com/flutter/flutter/issues/164983. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This commit is contained in:
parent
97bdde5f74
commit
673d9979e7
@ -9,6 +9,7 @@ import '../base/common.dart';
|
||||
import '../convert.dart';
|
||||
import '../features.dart';
|
||||
import '../globals.dart' as globals;
|
||||
import '../ios/code_signing.dart';
|
||||
import '../runner/flutter_command.dart';
|
||||
import '../runner/flutter_command_runner.dart';
|
||||
|
||||
@ -28,10 +29,17 @@ class ConfigCommand extends FlutterCommand {
|
||||
'and "--${FlutterGlobalOptions.kDisableAnalyticsFlag}" top level flags.)',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'clear-ios-signing-cert',
|
||||
'clear-ios-signing-settings',
|
||||
negatable: false,
|
||||
aliases: <String>['clear-ios-signing-cert'],
|
||||
help:
|
||||
'Clear the saved development certificate or provisioning profile choice used to sign apps for iOS device deployment.',
|
||||
);
|
||||
argParser.addFlag(
|
||||
'select-ios-signing-settings',
|
||||
negatable: false,
|
||||
help:
|
||||
'Clear the saved development certificate choice used to sign apps for iOS device deployment.',
|
||||
'Complete prompt to select and save code signing settings used to sign apps for iOS device deployment.',
|
||||
);
|
||||
argParser.addOption('android-sdk', help: 'The Android SDK directory.');
|
||||
argParser.addOption(
|
||||
@ -153,8 +161,23 @@ class ConfigCommand extends FlutterCommand {
|
||||
_updateConfig('jdk-dir', stringArg('jdk-dir')!);
|
||||
}
|
||||
|
||||
if (argResults!.wasParsed('clear-ios-signing-cert')) {
|
||||
_updateConfig('ios-signing-cert', '');
|
||||
if (argResults!.wasParsed('clear-ios-signing-settings')) {
|
||||
XcodeCodeSigningSettings.resetSettings(globals.config, globals.logger);
|
||||
}
|
||||
|
||||
if (argResults!.wasParsed('select-ios-signing-settings')) {
|
||||
final XcodeCodeSigningSettings settings = XcodeCodeSigningSettings(
|
||||
config: globals.config,
|
||||
logger: globals.logger,
|
||||
platform: globals.platform,
|
||||
processUtils: globals.processUtils,
|
||||
fileSystem: globals.fs,
|
||||
fileSystemUtils: globals.fsUtils,
|
||||
terminal: globals.terminal,
|
||||
plistParser: globals.plistParser,
|
||||
);
|
||||
|
||||
await settings.selectSettings();
|
||||
}
|
||||
|
||||
if (argResults!.wasParsed('build-dir')) {
|
||||
|
@ -400,6 +400,9 @@ class CreateCommand extends FlutterCommand with CreateBase {
|
||||
logger: globals.logger,
|
||||
config: globals.config,
|
||||
terminal: globals.terminal,
|
||||
fileSystem: globals.fs,
|
||||
fileSystemUtils: globals.fsUtils,
|
||||
plistParser: globals.plistParser,
|
||||
);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -281,6 +281,9 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
logger: globals.logger,
|
||||
config: globals.config,
|
||||
terminal: globals.terminal,
|
||||
fileSystem: globals.fs,
|
||||
fileSystemUtils: globals.fsUtils,
|
||||
plistParser: globals.plistParser,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -893,6 +893,9 @@ def __lldb_init_module(debugger: lldb.SBDebugger, _):
|
||||
logger: globals.logger,
|
||||
config: globals.config,
|
||||
terminal: globals.terminal,
|
||||
fileSystem: globals.fs,
|
||||
fileSystemUtils: globals.fsUtils,
|
||||
plistParser: globals.plistParser,
|
||||
);
|
||||
|
||||
final String projectName = parent.manifest.appName;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user