DCloud_HB_WDL
DCloud_HB_WDL
  • 发布:2021-01-07 19:11
  • 更新:2024-10-16 14:39
  • 阅读:10670

HBuilderX: 关于iOS安心打包、本地重签,证书安装教程

分类:HBuilderX

前言

MacOSX iOS安心打包、本地重签失败, 需要安装相关证书.

打开证书目录

安装证书

  1. 点击证书文件, 会自动打开钥匙串, 下拉列表钥匙串, 选择系统, 点击 添加 按钮
  2. 点击添加后, 请在弹窗中,输入电脑密码, 允许钥匙串访问.
  3. 按照上面的步骤, 依次完成其它证书的导入.

0 关注 分享

要回复文章请先登录注册

一只老猿

一只老猿

刚刚搞定,分享一下 macOS 11.6:
21年5~8月多次使用安心打包成功过。隔了近五个月,更新APP版本时,打包失败。
有几个坑
1、打包失败会先弹框“签名失败” ,但要隔十几秒到三十秒才会有错误日志的链接。前三四次失败都没发现,直接去看证书问题了。
2、其中因为21年8月升级了MacOS到11,导致xcode未安装xcrun,这是苹果系统升级的bug。 因为前几次都没注意要到25秒后会出现错误日志的链接。前几次都是错在这里。
报错信息 crun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
解决方法:终端命令 xcode-select --install
3、安装好xcrun 打包还是一样显示“签名失败”的错,又失败了三次最后成功(其中重启了四五次)。
参考了:https://blog.csdn.net/jia12216/article/details/118151791
个人体会有两个关键: 1证书左上角一定要有 ‘登录’ 选项 2、3个证书状态是系统默认

希望能帮到后来的朋友
2022-01-19 16:05
一只老猿

一只老猿

MacOS 10.14以上系统 如何处理
2022-01-19 14:15
9***@qq.com

9***@qq.com

12.0.1 这个版本呢?
2021-11-30 19:28
晓宇

晓宇

为什么我把证书已经全部装好了还提示这个问题?
2021-11-26 13:21
z***@163.com

z***@163.com

回复 z***@163.com :
问题解决,我遇到的问题是证书默认是不可信任的,改为始终信任
2021-10-19 16:36
z***@163.com

z***@163.com

导入证书后,重新打包还是提示错误
[Info] begin getCertCName...
[Info] begin updatePlistInfo to ipa...
[Info] begin codesignApp to ipa...
[Error] HBuilder.xcarchive/Payload/HBuilder.app: replacing existing signature
[Error] Warning: unable to build chain to self-signed root for signer "Apple Development: XXXX XXX (XXXXXXX)"
[Error] HBuilder.xcarchive/Payload/HBuilder.app: errSecInternalComponent
2021-10-19 15:53
zhaokui

zhaokui

导入证书报错什么情况啊。

出现错误。无法导入“Developer ID Certification Authority”。

错误:-25294
2021-09-23 10:21
1***@qq.com

1***@qq.com

为什么按照步骤一直说没有证书没有证书
2021-09-17 11:57
2***@qq.com

2***@qq.com

11.4也报这个问题,重启也无效
[Info] begin copyFile files to ipa...
[Info] begin replace files to ipa...
[Info] begin update mobileprovision to ipa...
[Info] begin outPut t_entitlements_full plist file...
[Info] begin outPut outPutEntitlements plist file...
[Info] begin verifyPlistFiles
[Info] verifyFiles is empty
[Info] begin update files to ipa...
[Info] begin createKeychain...
[Info] begin unlockKeychain...
[Info] begin setListKeychains...
[Info] begin importAppleCerts...
[Info] 1 certificate imported.
[Info] 1 certificate imported.
[Info] 1 certificate imported.
[Info] begin importSecurity...
[Info] 1 identity imported.
[Info] begin setkeyPartitionList...
[Info] keychain: "/Users/jm/Library/Keychains/HBuilderX.keychain-db"
[Info] version: 512
[Info] class: 0x00000010
[Info] attributes:
[Info] 0x00000000 <uint32>=0x00000010
[Info] 0x00000001 <blob>="JM"
[Info] 0x00000002 <blob>=<NULL>
[Info] 0x00000003 <uint32>=0x00000001
[Info] 0x00000004 <uint32>=0x00000000
[Info] 0x00000005 <uint32>=0x00000000
[Info] 0x00000006 <blob>=0x9B19976FE5C580BB6EC5E30C62C99BBC990F22EE "\233\031\227o\345\305\200\273n\305\343\014b\311\233\274\231\017"\356"
[Info] 0x00000007 <blob>=<NULL>
[Info] 0x00000008 <blob>=0x7B38373139316361322D306663392D313164342D383439612D3030303530326235323132327D00 "{87191ca2-0fc9-11d4-849a-000502b52122}\000"
[Info] 0x00000009 <uint32>=0x0000002A "\000\000\000*"
[Info] 0x0000000A <uint32>=0x00000800
[Info] 0x0000000B <uint32>=0x00000800
[Info] 0x0000000C <blob>=0x0000000000000000
[Info] 0x0000000D <blob>=0x0000000000000000
[Info] 0x0000000E <uint32>=0x00000001
[Info] 0x0000000F <uint32>=0x00000001
[Info] 0x00000010 <uint32>=0x00000001
[Info] 0x00000011 <uint32>=0x00000000
[Info] 0x00000012 <uint32>=0x00000001
[Info] 0x00000013 <uint32>=0x00000001
[Info] 0x00000014 <uint32>=0x00000001
[Info] 0x00000015 <uint32>=0x00000001
[Info] 0x00000016 <uint32>=0x00000001
[Info] 0x00000017 <uint32>=0x00000001
[Info] 0x00000018 <uint32>=0x00000001
[Info] 0x00000019 <uint32>=0x00000001
[Info] 0x0000001A <uint32>=0x00000001
[Info] begin getCertCName...
[Info] begin updatePlistInfo to ipa...
[Info] begin codesignApp to ipa...
[Error] HBuilder.xcarchive/Payload/HBuilder.app: replacing existing signature
[Error] Warning: unable to build chain to self-signed root for signer "iPhone Developer: Haiwen zuo (C3272A9T8Q)"
[Error] HBuilder.xcarchive/Payload/HBuilder.app: errSecInternalComponent
[Info] begin importSecurity...
[Info] 1 identity imported.
[Error] HBuilder.xcarchive/Payload/HBuilder.app: replacing existing signature
[Error] Warning: unable to build chain to self-signed root for signer "iPhone Developer: Haiwen zuo (C3272A9T8Q)"
[Error] HBuilder.xcarchive/Payload/HBuilder.app: errSecInternalComponent
[Info] begin importSecurity...
[Info] 1 identity imported.
[Error] codesignApp to ipa failed
[Info] Package make result:Failed. Reason:
2021-08-07 22:58
哈咯

哈咯

此问题是苹果系统问题,经过研究,是打开苹果自家应用,比如transporter,iTunes会导致钥匙串访问中-钥匙串下的登录选项自动隐藏,从而会导致各种软件不能读取钥匙串中的东西,这个问题我深受其害,目前只能重启电脑解决,很烦。
2021-07-18 11:45