Enabled provisioning updates and device registration during building xcarchive. (#159622)

Provisioning updates and device registration were disabled when
development team was specified in the xcode project. This lead to build
error when provisioning profile was not present. Now provisioning
updates and device registration are enabled when tool builds codesigned
archive. This will allow to build the iOS version of app without
launching xcode in order to enforce provisioning profile updates.

Issues fixed by this PR.
* https://github.com/flutter/flutter/issues/139212
* https://github.com/flutter/flutter/issues/113977
* https://github.com/flutter/flutter/issues/121702 (partly because
author asks for possibility of passing xcode flags like
allowProvisioningUpdates)



## 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] All existing and new tests are passing.
This commit is contained in:
Krzysztof Czarnota 2025-01-22 19:54:08 +01:00 committed by GitHub
parent f2e6dbc567
commit e33e4f0476
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View File

@ -315,6 +315,9 @@ Future<XcodeBuildResult> buildXcodeProject({
for (final MapEntry<String, String> signingConfig in autoSigningConfigs.entries) {
buildCommands.add('${signingConfig.key}=${signingConfig.value}');
}
}
if (codesign) {
buildCommands.add('-allowProvisioningUpdates');
buildCommands.add('-allowProvisioningDeviceRegistration');
}

View File

@ -167,6 +167,8 @@ void main() {
'-configuration',
if (simulator) 'Debug' else 'Release',
if (verbose) 'VERBOSE_SCRIPT_LOGGING=YES' else '-quiet',
'-allowProvisioningUpdates',
'-allowProvisioningDeviceRegistration',
'-workspace',
if (customNaming) 'RenamedWorkspace.xcworkspace' else 'Runner.xcworkspace',
'-scheme',

View File

@ -172,6 +172,8 @@ void main() {
'-configuration',
'Release',
if (verbose) 'VERBOSE_SCRIPT_LOGGING=YES' else '-quiet',
'-allowProvisioningUpdates',
'-allowProvisioningDeviceRegistration',
'-workspace',
'Runner.xcworkspace',
'-scheme',

View File

@ -48,6 +48,8 @@ const List<String> kRunReleaseArgs = <String>[
'-configuration',
'Release',
'-quiet',
'-allowProvisioningUpdates',
'-allowProvisioningDeviceRegistration',
'-workspace',
'Runner.xcworkspace',
'-scheme',
@ -334,6 +336,8 @@ void main() {
'-configuration',
'Release',
'-quiet',
'-allowProvisioningUpdates',
'-allowProvisioningDeviceRegistration',
'-workspace',
'Runner.xcworkspace',
'-scheme',