无法在设备上运行应用:iOS 9框架无法进行代码签名 [英] Can't run app on device: iOS 9 frameworks won't codesign

查看:91
本文介绍了无法在设备上运行应用:iOS 9框架无法进行代码签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用部署目标iOS 7更新应用程序,使其可以与iOS 9一起使用。此外,我还添加了一些很棒的iOS 8和9功能。我读了很多关于向后版本兼容性的文章,而Swift 2.0使它变得更容易。到目前为止,我所关心的事情是:

I'm updating an app with deployment target iOS 7 so it can work with iOS 9. Also, I'm adding some cool iOS 8 and 9 features. I've read a lot of article about backwards version compatibility and now that Swift 2.0 makes it easier. The things I've taken care of so far are:


  • 在iOS 9上设置了基本SDK,在版本7上设置了部署目标

  • 使用新的API时,使用 #available(iOS 9.0,*)在运行时检查版本

  • 可选地链接仅iOS9框架,如下所示:

  • Having the Base SDK set at iOS 9 and the deployment target set at version 7
  • Checking the version at runtime with if #available(iOS 9.0, *) when using the new APIs
  • Linking the only-iOS9 frameworks optionally, as seen here:

As您可以看到我正在使用的两个新框架是 ContactsUI CoreSpotlight 。当我在模拟器中运行该应用程序时,它可以完美运行,但是当我尝试在我的设备(显然是运行iOS 9)上构建并运行该应用程序时,出现以下代码签名错误:

As you can see the two new frameworks I'm using are ContactsUI and CoreSpotlight. When I run the app in the simulator it works perfectly, but when I try to build and run it on my device (which is running iOS 9 obviously) I get the following code signing error:

/path/to/a/file.framework: bundle format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1

对于ContactsUI框架和CoreSpotlight,此错误都会出现两次。

This error appears twice, for both the ContactsUI framework and the CoreSpotlight.

起初,我认为这是兼容性问题,这是我在iOS 7设备上尝试运行我的应用程序(以检查其是否正确运行)时第一次出现的问题,但是后来我的应用程序也发生了常规和最新的设备。

At first I thought that was a compatibility issue as it appeared for the first time when I tried to run my app on a iOS 7 device (to check it ran correctly), but then the same happened with my regular and up-to-date device.

这里的问题是什么?代码签名错误是否与框架的兼容性有关?最后,解决此问题后,我的应用程序是否可以在我要支持的所有版本上运行?

Which is the issue here? Does the code signing error have to do with the compatibility of the frameworks? And, finally, when this is solved, will my app run on all the versions I want to support?

如果您需要更多详细信息,请提前发表评论。

Thanks in advance, if you need more details just comment.

推荐答案

我通过仅从 Embedded Binaries 列表中删除框架来解决了该问题。现在,我的所有框架仅在链接的框架和库列表中:

I fixed the issue by just removing the frameworks from the Embedded Binaries list. Now I have all my frameworks only in the Linked Frameworks And Libraries list:

这篇关于无法在设备上运行应用:iOS 9框架无法进行代码签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆