The following error is displayed when attempting to build on an IOS device:
As shown in the picture below, the Signing setting in Xcode is well done.
Can you tell me the cause and solution of this?

Could not build the precompiled application for the device.
Error (Xcode): Signing for "GoogleSignIn-GoogleSignIn" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/home_1/StudioProjects/Example%20Project/app/ios/Pods/Pods.xcodeproj


Error (Xcode): Signing for "DKPhotoGallery-DKPhotoGallery" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/home_1/StudioProjects/Example%20Project/app/ios/Pods/Pods.xcodeproj


Error (Xcode): Signing for "DKImagePickerController-DKImagePickerController" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/home_1/StudioProjects/Example%20Project/app/ios/Pods/Pods.xcodeproj


Error (Xcode): Signing for "gRPC-C++-gRPCCertificates-Cpp" requires a development team. Select a development team in the Signing & Capabilities editor.
/Users/home_1/StudioProjects/Example%20Project/app/ios/Pods/Pods.xcodeproj

enter image description here

推荐答案

在切换到Xcode14之后,我今天遇到了这种情况.try 将此添加到您的播客文件中

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_DEVELOPMENT_TEAM_ID'
      end
    end
  end
end

不要忘记将YOUR_DEVELOPMENT_TEAM_ID替换为您可以在developer.apple.com中找到的实际开发团队ID

这将永久解决该问题.

如果您不想使用团队ID,则可以执行以下操作:

post_install do |installer|
  installer.pods_project.targets.each do |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

Ios相关问答推荐

彩色进度线--SWIFT

在SwiftUI中使用系统图像和色调创建圆形按钮

用于HDR显示的CI上下文选项

清除/删除 NavigationController 中的多个 ViewController

iOS应用启动时崩溃问题解决方法-NO_CRASH_STACK-DYLD 4个符号丢失

尽管存在浮点错误,如何显示正确的计算结果.计算器应用程序

动画文本位置

拔下设备后,DriverKit USB 驱动程序 (dext) 进程不会终止

在 SwiftUI 中放置全局 NavigationPath 的位置

SwiftUI 中的描边图像边框

react 在 android 上运行的本机应用程序,但在 iOS 上出现问题,详细信息在描述中共享

如何在 SwiftUI 中只显示一次随机数组的项目?

来自 c++ 的runtime_error未在 iOS 中捕获

如何让我的 iOS 应用程序与 api 连接?

Apple Push Service 证书不受信任

UIScrollview 获取touch 事件

iOS在应用程序中下载并保存图像

以编程方式确定 iPhone 是否越狱

/usr/bin/codedesign 失败,退出代码为 1

UITableView 中的圆形 UIImageView 没有性能影响?