ios Xcode6:嵌入式二进制文件未使用与父应用程序相同的证书进行签名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25927604/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode6:Embedded binary is not signed with the same certificate as the parent app
提问by JohnyDgoode
After I add Today App Extension Target,I become impossible to compile project. below is error:
添加Today App Extension Target后,我无法编译项目。下面是错误:
error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.
Embedded Binary Signing Certificate: iPhone Developer: (Developer name) (number)
Parent App Signing Certificate: iPhone Developer: (Developer name) (number)
error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.
嵌入式二进制签名证书:iPhone 开发者:(开发者名称)(编号)
父应用程序签名证书:iPhone 开发者:(开发者名称)(编号)
but Embedded binary certificate and parent app's cerificate are the same. So I'm confusing now...
但是嵌入式二进制证书和父应用程序的证书是相同的。所以我现在很困惑...
采纳答案by JohnyDgoode
I tried to run project in iPhone5,but App Extension does'nt support 32-bit architecture.So When I build project in iPhone5S,I can build the project !
我尝试在 iPhone5 中运行项目,但 App Extension 不支持 32 位架构。所以当我在 iPhone5S 中构建项目时,我可以构建项目!
回答by marcshilling
I had to select my app under 'Targets', then go to the 'Capabilities' tab and click 'Fix Issues' under the 'App Groups' section
我必须在“目标”下选择我的应用程序,然后转到“功能”选项卡并单击“应用程序组”部分下的“修复问题”
回答by Maxwell
In the case of using WatchKit, make sure that your Watch App has the correct "Team" selected in the Watch App Target settings (under General > Signing > Team). I had set the phone app's team, but not the watch app's team.
在使用 WatchKit 的情况下,请确保您的 Watch App 在 Watch App Target 设置(在 General > Signing > Team 下)中选择了正确的“Team”。我设置了手机应用的团队,但没有设置手表应用的团队。
回答by smitt04
I had discrepancies under Code Signing. My Extension and Main app had different certificates selected. Once I set both to use distribution it worked fine.
我在代码签名下有差异。我的扩展程序和主应用程序选择了不同的证书。一旦我将两者都设置为使用分发,它就可以正常工作。
回答by us_david
If your Xcode has been working fine but stopped working after you add an extension target to your project, most of the time is that your app was signed using a older certificate (still valid with your name etc.), while your extension is signed with a newer certificate with entitlement for the extension. This is why the error. In this case, you most likely have two certificates with the same name, and this what you can do:1.Go to Xcode->Preference;
2. Select Accounts Tab;
3. Select your Apple ID then click on View Details;
4. Under signing Identities List Window, select IOS Development, then click on the
little Configuration icon, and select Revoke;
5. Xcode will then try to download a new certificate.
You can do a clean build after this so both your app and extension will be signed using the new certificate.
如果您的 Xcode 一直工作正常,但在您向项目添加扩展目标后停止工作,大多数情况下是您的应用程序是使用旧证书签名的(使用您的姓名等仍然有效),而您的扩展程序签名为具有扩展权限的较新证书。这就是错误的原因。在这种情况下,您很可能有两个名称相同的证书,您可以这样做:1.Go to Xcode->Preference;
2. 选择帐户选项卡;
3. 选择您的 Apple ID,然后点击查看详情;
4.在签名Identities List Window下,选择IOS Development,然后点击小配置图标,选择Revoke;
5. Xcode 将尝试下载新证书。
您可以在此之后进行干净的构建,以便您的应用程序和扩展程序都将使用新证书进行签名。
回答by Fra
I solved it by deleting my Apple ID account in
我通过删除我的 Apple ID 帐户解决了这个问题
Preferences -> Accounts
and then logging back in again with my Apple ID
然后使用我的 Apple ID 重新登录
回答by Remco
I had the same issue in Xcode 6, but in my case it occured because of having two active developer certificates. Revoking one had fixed the issue.
我在 Xcode 6 中遇到了同样的问题,但在我的情况下,它是因为有两个有效的开发人员证书而发生的。撤销一个已经解决了这个问题。
回答by apalvai
This issue might arise in the case where the embedded app targets like extensions or watchapp does not have the matching teamselected in the Generalsection, as the main iOS app.
如果嵌入式应用程序的目标(如扩展程序或 watchapp)没有在“常规”部分选择匹配的团队作为主 iOS 应用程序,则可能会出现此问题。
Selecting the right team for all relevant targets fixed the issue for me.
为所有相关目标选择合适的团队为我解决了这个问题。
回答by Sunil
I had a similar issue. For me the issue was with the certificate showing, 'signed by unknown authority'. I had followed the below steps and it is resolved. The problem was missing apple WWDR intermediate certificate.
我有一个类似的问题。对我来说,问题在于证书显示“由未知机构签名”。我已按照以下步骤操作并已解决。问题是缺少苹果 WWDR 中间证书。
We must also install the WWDR intermediate certificate issued by Apple's worldwide developer relations. It can be downloaded from the portal or directly at http://developer.apple.com/certificationauthority/AppleWWDRCA.cerMake sure you add this to your keychain as well.
我们还必须安装 Apple 全球开发者关系颁发的 WWDR 中间证书。它可以从门户网站或直接从http://developer.apple.com/certificationauthority/AppleWWDRCA.cer下载确保您也将其添加到您的钥匙串中。
To add the certificate: open your keychain utility software on your Mac computer, then go to File→Import items, then select AppleWWDRCA.cer.
要添加证书:在 Mac 计算机上打开钥匙串实用程序软件,然后转到文件→导入项目,然后选择 AppleWWDRCA.cer。
回答by John Doe
There are quite a few reasons the issue may emanate from. If none of the other answers are working for you - would like to add another plausible check that helped me. Ensure the certificate you are signing with doesn't have 'Always Trust' (you will see a green '+' sign if the setting is such).
出现问题的原因有很多。如果其他答案都不适合您 - 想添加另一个对我有帮助的合理检查。确保您使用的证书没有“始终信任”(如果设置是这样,您将看到绿色的“+”符号)。
- Go to Key Chain access, double click on the certificate you are using.
- Expand the 'Trust' drop down and change/set to 'Use System Defaults' from 'Always Trust'.
- 转到 Key Chain access,双击您正在使用的证书。
- 展开“信任”下拉菜单并从“始终信任”更改/设置为“使用系统默认值”。
It's especially true if you are using Swift in your project as the 'Always Trust' setting breaks pertinent Swift libraries.
如果您在项目中使用 Swift,则尤其如此,因为“始终信任”设置会破坏相关的 Swift 库。
回答by Brie
For Xcode 8 beta 3
对于 Xcode 8 测试版 3
My build numbers were off on my different Targets in my Xcode project file.
我的 Xcode 项目文件中的不同 Targets 上的内部版本号已关闭。
My iOS target had a build version 3, but my watch app target and my share extension target both had build version 1.
我的 iOS 目标有一个构建版本 3,但我的手表应用目标和我的共享扩展目标都有构建版本 1。
All I did was match all the targets' build numbers (changed them all to 3) and it fixed the issue.
我所做的只是匹配所有目标的内部版本号(将它们全部更改为 3)并解决了问题。
Hope this helps.
希望这可以帮助。