升级Xcode14后,ShareSDK运行时报必须Code Sign问题,Signing for "mob_sharesdk-ShareSDK" requires a development t...

问题:
.../Pods/Pods.xcodeproj error project: Signing for "mob_sharesdk-ShareSDK" requires a development team. Select a development team in the Signing & Capabilities editor.
.../Pods/Pods.xcodeproj error project: Signing for "mob_sharesdk-ShareSDK_JS_QQ" requires a development team. Select a development team in the Signing & Capabilities editor.
.../Pods/Pods.xcodeproj error project: Signing for "mob_sharesdk-ShareSDK_JS_WeChat" requires a development team. Select a development team in the Signing & Capabilities editor.

解决方案一

  1. 打开podfile文件中添加以下代码
# 不进行代码签名
post_install do |installer|
  installer.pods_project.targets.each do |target|
    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
# 或
post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end

# 或者将CODE_SIGN_IDENTITY置为空
post_install do |installer|
  installer.pods_project.targets.each do |target|
    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_SIGN_IDENTITY'] = ''
      end
    end
  end
end

# 或者设置Team ID
post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['DEVELOPMENT_TEAM'] = 'Team ID'
      end
    end
  end
end
  1. 执行pod命令
pod install

解决方案二

按照这种解决方式,每次需要手动更改配置


ShareSdk证书问题解决方案-Mob.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容