8

Updated my xcode to 14.0. After upgrading the xcode, My Flutter project throwing the below error.

select a development team in the Signing & Capabilities editor

Target > Signing & Capabilities > Team also already selected

Could not build the precompiled application for the device.
Error (Xcode): Signing for "DKImagePickerController-DKImagePickerController" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/rsoft/StudioProjects/salezrobot/ios/Pods/Pods.xcodeproj

Error (Xcode): Signing for "DKPhotoGallery-DKPhotoGallery" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/rsoft/StudioProjects/salezrobot/ios/Pods/Pods.xcodeproj`enter code here`
Anand
  • 4,355
  • 2
  • 35
  • 45

5 Answers5

4

I found a temporary solution for this issue

Open your flutter project in Xcode

Pods -> Targets -> Signing & Capabilities -> Select Team

Select Team for each and every Targets

Note : The above steps you need to do whenever you take build. this is not a permanent solution

enter image description here

Anand
  • 4,355
  • 2
  • 35
  • 45
  • 1
    I'm looking for a permanent solution. – e a Sep 27 '22 at 09:28
  • I'm also looking bro, If u find a solution ans me bro – Anand Sep 27 '22 at 11:02
  • Actually I found something that helped me finally. https://stackoverflow.com/questions/73711671/flutter-ios-build-error-select-a-development-team-in-the-signing-capabiliti – e a Sep 28 '22 at 12:10
4

Apparently, it was an underlying issue in the Flutter framework, which was fixed in Flutter 3.3.3, released on September 28th.

It is the first item in the list of hotfixes that this version provides.

Try running flutter upgrade to make sure you are running the latest version of Flutter. If the issue persists, try a flutter clean and a manual pod install in your project's iOS folder.

mrcendre
  • 1,053
  • 2
  • 15
  • 28
3

This issue relates to XCode 14 pods signing.

To make everything work again, update your podfile with some content:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    # Add the line below
    target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'

    target.build_configurations.each do |config|

      # And lines from here
      if target_is_resource_bundle
        config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
        config.build_settings['CODE_SIGNING_IDENTITY'] = '-'
        config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-'
      end
      # to here

    end
  end
end

Then run:

flutter pub cache repair
flutter clean
flutter pub get
cd ios
rm -rf Podfile.lock Pods/ .symlinks Flutter/Flutter.podspec
pod install
pod repo update
Alex Verbitski
  • 499
  • 3
  • 12
1

Just update Flutter version to 3.3.3
See hot-fix notes here

Mostafa Soliman
  • 725
  • 6
  • 20
0

Change your podfile

From

 post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

To

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.build_settings['WRAPPER_EXTENSION'] == 'bundle'
        config.build_settings['DEVELOPMENT_TEAM'] = 'your team id'
      end
    end
  end
end

or

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
  end
end
Anand
  • 4,355
  • 2
  • 35
  • 45