Xcode10.x 打包出现Profile:None导致证书丢失

自从升级了公司的Xcode(9.x -> 10.x)后,cordova打出来的ipa无法安装,因为打包出来的包没有包含provisioning签名。

Xcode打包会出现None
8331588919308_.pic.jpg
原生解决方案

将Xcode的Build System改回Legacy Build System


9091588924614_.pic_hd.jpg
Cordova解决方案

build.json文件添加配置参数-UseModernBuildSystem=0

{
  "ios" : {
    "release" : {
      "buildFlag" : [
        "-UseModernBuildSystem=0"
      ]
    },
    "debug" : {
      "buildFlag" : [
        "-UseModernBuildSystem=0"
      ]
    }
  }
}

使用命令行打包

cordova run ios --buildFlag="-UseModernBuildSystem=0"
cordova build ios --buildFlag="-UseModernBuildSystem=0"

参考文献

Avoiding the modern build system in cordova-ios
XCode 10 upgrade makes Cordova builds fail
Unable to distribute with Xcode 10
Status of Xcode 10 support

推荐阅读更多精彩内容