适配iOS16和Xcode14方案

1. 不升级Xcode如何调试iOS 16

  1. 下载iOS16 Support文件
    • https://github.com/RayJiang16/iOSDeviceSupport
  2. 放置到Xcode DeviceSupport目录重启Xcode即可/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

2. iOS16手机开启调试模式

开启开发者模式 “developer mode disable”
解决办法:在你的iPhone中操作调试手机–设置–隐私与安全–(滑动到最底部)开发者模式–开启开发者模式(需要重启手机)

3. 运行遇到的报错 “error: Signing for “XX” requires a development team.”

“Select a development team in the Signing & Capabilities editor.”
几种解决方案如下:

1. 方案1:Build Settings配置

在Xcode中 选中XX对应的target (in target ‘XX’)
点击Build Settings 中 在User-Defined (用户自定义那一栏)
添加CODE_SIGNING_ALLOWED = NO 关闭对XX的Code签名

2. 方案2:Pod配置CODE_SIGNING_ALLOWED (推荐)
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

参考:https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1201464693

3. 方案3:Pod配置DEVELOPMENT_TEAM
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"] = " Your Team ID  "
         end
    end
  end
end

参考:https://github.com/dbmz502/MonkeyDev_Xcode14

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值