diff --git a/packages/flutter_tools/lib/src/commands/build_ios.dart b/packages/flutter_tools/lib/src/commands/build_ios.dart index a9f7ecbd06..07f57f45fb 100644 --- a/packages/flutter_tools/lib/src/commands/build_ios.dart +++ b/packages/flutter_tools/lib/src/commands/build_ios.dart @@ -146,6 +146,10 @@ class BuildIOSArchiveCommand extends _BuildIOSSubCommand { ...globals.xcode.xcrunCommand(), 'xcodebuild', '-exportArchive', + if (shouldCodesign) ...[ + '-allowProvisioningDeviceRegistration', + '-allowProvisioningUpdates', + ], '-archivePath', globals.fs.path.absolute(app.archiveBundleOutputPath), '-exportPath', diff --git a/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart index 52220cd0fe..d4705c569b 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart @@ -109,6 +109,8 @@ void main() { 'xcrun', 'xcodebuild', '-exportArchive', + '-allowProvisioningDeviceRegistration', + '-allowProvisioningUpdates', '-archivePath', '/build/ios/archive/Runner.xcarchive', '-exportPath',