uni-app cli ios打包失败 通过hbuildx 直接打包正常

uni-app cli ios打包失败 通过hbuildx 直接打包正常

操作步骤:

  • 新建项目
  • 使用ios正式证书。
  • 执行如下cli
    cli pack --project xxxxxxx --platform ios --safemode true --ios.bundle xxx.ccc.ccc --ios.supporteddevice iPhone,iPad --ios.profile path/profile.mobileprovision --ios.certfile path/cert.p12 --ios.certpassword xxxxxxx --splashads true
    

预期结果:

  • 打包成功

实际结果:

  • 打包失败

bug描述:

  • cli pack --project xxxxxxx --platform ios --safemode true --ios.bundle xxx.ccc.ccc --ios.supporteddevice iPhone,iPad --ios.profile path/profile.mobileprovision --ios.certfile path/cert.p12 --ios.certpassword xxxxxxx --splashads true

通过执行 cli 打包 会报

Appid: UNI1ECBCF6
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild archive -sdk iphoneos14.5 -project [PackagePath]/HBuilder.xcodeproj -archivePath [PackagePath]/XArchive/HBuilder.xcarchive -scheme HBuilder CONFIGURATION=Release

User defaults from command line:

IDEArchivePathOverride = [PackagePath]/XArchive/HBuilder.xcarchive
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:

CONFIGURATION = Release
SDKROOT = iphoneos14.5

note: Using new build system note: Building targets in parallel note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete error: Provisioning profile “FB_Development_20201123” doesn’t include signing certificate “iPhone Developer: P B (CXHV2PS9PG)”. ARCHIVE FAILED

Error code = 0
Error message:
opendir([PackagePath]/XArchive/exportArchive): failed to open dir: No such file or directory

表格信息

信息
产品分类 HbuilderX
PC开发环境操作系统 Mac
PC开发环境操作系统版本号 mac os 11.6
HBuilderX版本号 3.2.9

更多关于uni-app cli ios打包失败 通过hbuildx 直接打包正常的实战教程也可以访问 https://www.itying.com/category-93-b0.html

5 回复

未改任何参数 直接选择 发行-- 云打包 可以成功。 cli就会失败,我肯定我证书没有任何问题。

更多关于uni-app cli ios打包失败 通过hbuildx 直接打包正常的实战教程也可以访问 https://www.itying.com/category-93-b0.html


两种打包,使用的是同一个证书吗?

同一个。 流程是这样,以下都是用cli操作的

把第3步换成手动发布 正常。证书都是一个

从错误信息来看,CLI打包失败的主要原因是证书和描述文件不匹配。

错误关键点:

Provisioning profile "FB_Development_20201123" doesn't include signing certificate "iPhone Developer: P B (CXHV2PS9PG)"
回到顶部