-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
cp: approvedApproved cherry-pick requestApproved cherry-pick request
Description
issue_link
Commit Hash
Target
stable
pr_link
Impacted Users
iOS developers using Xcode 14 who use plugins with resource bundles (images, localization strings), including google_sign_in plugin.
Impact Description
iOS developers on the newest version of Xcode using plugins with resource bundles like google_sign_in will not be able to build or release their apps. This is a regression caused by behavior changes in Xcode 14.
Re: low test coverage: I have tested the change, but this only really reproduces in an environment that codesigns the app. We generally do not do that in CI due to cert installation complications. I filed #111760 to prevent these issues in the future.
Workaround
- Open
ios/Podfile- Replace the following:
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + # Workaround https://github.com/flutter/flutter/issues/111475. + target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle' + target.build_configurations.each do |build_configuration| + if target_is_resource_bundle + build_configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' + build_configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO' + build_configuration.build_settings['CODE_SIGNING_IDENTITY'] = '-' + build_configuration.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-' + end + end end end
Risk
low
Test Coverage
no
Validation Steps
The following should succeed.
$ flutter create test_bundle
$ cd test_bundle
$ flutter pub add google_sign_in
$ flutter build ios --release
Failure looks like:
Error (Xcode): Signing for "GoogleSignIn-GoogleSignIn" requires a development
team. Select a development team in the Signing & Capabilities editor.
workerbee22, tonnyavery and VictorUvarov
Metadata
Metadata
Assignees
Labels
cp: approvedApproved cherry-pick requestApproved cherry-pick request