iOS This certificate has an invalid issuer

本文提供了解决iOS开发中证书失效的问题方法。通过删除过期证书并安装最新证书,确保开发项目能够正常打包。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


原文链接:http://www.jianshu.com/p/d4fa9f85b7c0

打包直接报错,错误如图


1.png

根据错误信息到“钥匙串”里面看了一下证书,证书都莫名其妙的失效了,昨天还是好好的。折腾了半天才找到解决方案。

第一种方法:

1.打开系统中 钥匙串
2.点击左上钥匙串中的"登录",在点击左下种类中的"证书"
3.选择"Apple Worldwide Developer Certification Authority",单击右键,选择"查看简介"
4.找到信任并展开,把第一条改成始终信任,如图


60mW6.png


之后再看一下证书是不是恢复正常了

第二种方法:

1.下载这个文件
https://developer.apple.com/certificationauthority/AppleWWDRCA.cer,并安装。
2, 在"钥匙串"里选择"登录",然后点选"证书",在这个界面,选择工具栏的"显示" -> "显示已过期的证书",这时候你会发现一个过期的“WWDR Certificate”(Apple Worldwide Developer Relations Certification Authority),删除它。
3, 在"系统"的那一栏也有这个过期的“WWDR Certificate”,一并删除它。
4 ,不出意外你的证书那里从 “This certificate has an invalid issuer”(此证书的签发者无效)变成了 “This certificate is valid”了。

参考:
1.https://segmentfault.com/q/1010000004433963
2.http://stackoverflow.com/questions/31711335/ios-missing-or-invalid-signature-the-bundle-is-not-signed-using-an-apple-submis

感谢@池上金的解答,以后再遇到终于不用盲目瞎折腾了。


文/左岸浪人(简书作者)
原文链接:http://www.jianshu.com/p/9ff725584fe3
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

打包项目时候发现发现:


missing ios distribution signing identity for XXX interactive marketing planning co ltd


看起来应该是证书出问题了,打开钥匙串查看证书,发现之前的证书全部提示 “此证书的签发者无效”。


此证书的签发者无效


然后搜索资料,苹果官方给出了回答。

Thanks for bringing this to the attention of the community and apologies for the issues you’ve been having. This issue stems from having a copy of the expired WWDR Intermediate certificate in both your System and Login keychains. To resolve the issue, you should first download and install the new WWDR intermediate certificate (by double-clicking on the file). Next, in the Keychain Access application, select the System keychain. Make sure to select “Show Expired Certificates” in the View menu and then delete the expired version of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate (expired on February 14, 2016). Your certificates should now appear as valid in Keychain Access and be available to Xcode for submissions to the App Store.

发现之所以无效,是因为系统证书"Apple Worldwide Developer Relations Certification Intermediate Certificate"过期了。
苹果早在一个多月前就提醒开发者使用新证书。开发者如果不及时更新,不仅会影响到自己的开发工作,还有可能对用户造成困扰。这一份通知面向的是那些开发应用与 Apple Wallet、Safari 推送中心又或者是 Safari 插件相关的开发者。苹果还在通知中表示,开发者需要在 2016 年 2 月 14 日结束之前更新他们的安全证书。更新之后,安全证书的下一个失效期为 2023 年 2 月。


解决方案

Step 1
过期的证书是默认隐藏的,我们需要先让他显示出来,
点击在工具栏的显示->显示已过期的证书


显示已过期的证书


删除旧的过期证书(非常重要)
需要注意的是:在『登录』和『系统』中都有该证书,需要都删了,才可以

(1) 选择登录(Login),然后选证书(Certificates),右上角的搜索框中输入"worl"关键字,找到名叫(Apple WorldwideDeveloper Relations Certification Authority)的证书,删除它;
(2) 选择系统(System),同样删除该过期证书


Paste_Image.png


Step 2
下载最新的安全证书并双击安装
下载链接

Step 3
再次查看你的证书,是否显示为“This certificate is valid”("此证书有效"), 有效则表明成功, 否则需要检查下过期的证书是否删除干净。
下次更新时间是2023年,如果那个时候你还在做IOS开发,记得再次更新证书


苹果官方说明:

The previous Apple Worldwide Developer Relations Certification Intermediate Certificate expired on February 14, 2016 and the renewed certificate must now be used when signing Apple Wallet Passes, push packages for Safari Push Notifications, Safari Extensions, and submissions to the App Store, Mac App Store, and App Store for Apple TV.
更多

参考:

  1. stackoverflow上提供的方案
  2. iOS开发证书"此证书的签发者无效"解决方法

### CATIA CAA 中 `invalid BUILT_OBJECT_TYPE` 的解决方案 在处理 CATIA CAA 开发中的错误时,特别是遇到 `invalid BUILT_OBJECT_TYPE` 错误,通常是因为对象类型的定义不匹配或者未正确初始化所导致。以下是对此问题的分析以及可能的解决方法: #### 1. **确认对象类型的有效性** 需要验证当前使用的对象类型是否已被正确定义并注册到系统的内置类型库中。如果自定义的对象类型被创建,则应确保其继承关系和实现接口均满足要求[^1]。 ```cpp // 示例代码:检查对象类型是否存在 CATObjectType myType = GetBuiltInType("MyCustomTypeName"); if (myType == NULL) { throw std::runtime_error("Invalid object type specified."); } ``` #### 2. **初始化环境变量** 如果开发环境中存在配置缺失或路径设置不当的情况,可能导致无法识别某些预定义的对象类型。按照引用描述,在安装过程中需特别注意 RADER 和 VS2012 的集成步骤,尤其是 `.bat` 文件的位置指定与依赖 DLL 的复制操作[^2]。 #### 3. **调试对话框状态管理** 对于 `_isInited` 成员变量的状态跟踪也很重要。当该标志位始终保持为 FALSE 时,表明对话框尚未成功加载资源或绑定事件处理器。建议增加额外的日志记录功能来捕获具体失败原因。 ```cpp void DialogClass::Initialize() { if (!_isInited) { // 判断是否已初始化 _isInited = InitializeResources(); // 尝试执行实际初始化逻辑 } } bool DialogClass::InitializeResources() { try { LoadDialogTemplate(); ConnectControlEvents(); return TRUE; } catch (...) { LogError("Failed to initialize dialog resources."); return FALSE; } } ``` #### 4. **持久化窗口位置数据** 虽然原文提到尚不清楚如何存储上一次关闭后的对话框坐标信息,但实际上可以通过读写 INI 文件或其他形式的数据载体达成目标。下面给出了一种简单的实现方式作为参考: ```cpp #include <tchar.h> #include <windows.h> POINT SaveWindowPosition(HWND hwnd, LPCTSTR sectionName, LPCTSTR keyPrefix) { RECT rect; POINT pt; ::GetWindowRect(hwnd, &rect); pt.x = rect.left; pt.y = rect.top; WritePrivateProfileStruct(sectionName, keyPrefix, static_cast<void*>(&pt), sizeof(POINT), _T(".\\config.ini")); return pt; } BOOL RestoreWindowPosition(HWND hwnd, LPCTSTR sectionName, LPCTSTR keyPrefix) { POINT ptDefault = { CW_USEDEFAULT, CW_USEDEFAULT }; POINT* pptRestored = reinterpret_cast<POINT*>(ReadPrivateProfileStruct( sectionName, keyPrefix, nullptr, sizeof(POINT), _T(".\\config.ini"))); if (!pptRestored || !IsPointValid(*pptRestored)) { SetWindowPos(hwnd, HWND_TOP, ptDefault.x, ptDefault.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); delete pptRestored; // 清理内存分配 return FALSE; } SetWindowPos(hwnd, HWND_TOP, pptRestored->x, pptRestored->y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); delete pptRestored; return TRUE; } ``` 通过上述函数可以轻松保存/恢复任意窗口的位置参数至本地磁盘文件中去。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值