Flutter-错误(Xcode):签署“DKImagePickerController-DKImagePickerController”需要一个开发团队-请选择一个开发团队

svujldwt  于 2022-11-18  发布在  Flutter
关注(0)|答案(5)|浏览(323)

将我的xcode更新为14.0。升级xcode后,我的Flutter项目抛出以下错误。

select a development team in the Signing & Capabilities editor

目标〉签署和能力〉团队也已选定

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`
oxcyiej7

oxcyiej71#

显然,这是Flutter框架中的一个潜在问题,已在9月28日发布的Flutter 3.3.3中修复。
它是此版本提供的修复程序列表中的第一项。
请尝试运行flutter upgrade以确保您运行的是最新版本的Flutter。如果问题仍然存在,请尝试在项目的iOS文件夹中运行flutter clean和手动运行pod install

yv5phkfx

yv5phkfx2#

我找到了解决此问题的临时解决方案
Xcode中打开flutter项目

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

为每个Targets选择Team

  • 注意:* 无论何时进行构建,都需要执行上述步骤。这不是永久的解决方案

tv6aics1

tv6aics13#

只需将Flutter版本更新为3.3.3
请在此处查看热修复程序说明

31moq8wy

31moq8wy4#

此问题与XCode 14 pod签名有关。
若要让一切恢复正常,请使用一些内容更新您的podfile:

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

然后运行:

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
iq3niunx

iq3niunx5#

更改您的podfile

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

结束日期

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

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

相关问题