越狱手机运行程序退出: Killed: 9

越狱手机运行程序退出: Killed: 9

这种情况一般是由于签名问题

解决方法1(不推荐):

不使用苹果证书,而是:

  1. 创建自己的代码签名证书
  2. 修改XCODE环境
  3. 修改工程属性添加Build Phase

这样即可解决,详细参见:免证书开发……

------

解决方法2:

另外一种情况:编译的二进制程序在iPhone4上正常运行,在iPhone3GS上出现Killed: 9。

后来尝试使用免证书模式,同样问题,使用ldid -S pro也会出现_asset问题。

最后,新建一个Empty App工程(白屏工程),删除所有.m和.h,将先前工程中的.m和.h复制添加进来,设置标准签名证书,解决!

注意其中出现了一个问题:提示provisioning中不包含这个bundle identifier(其实应该是包含的),编译不过;后来发现,应该在Project->Build Settings->Code Signing中设置正确的开发者证书,然后还要在TARGETS->Build Settings->Code Signing中设置为iPhone Developer(并让Xcode自动显示灰色的(currently matches ….)),就可以了。

-----

解决方法3:

还有一种情况:

删掉手机文件,再上传(不要直接覆盖),运行即可成功

-----

解决方法4:

在mac上先进行ldid -S 删除证书操作,再传到ios上就可以了

解决方法5:

1) Using ldid -S is the correct usage. Not lowercase, as Lois says.

2) Usually, when I get this error, it's because I built my app with the wrong architectures. Most versions ofldid that I've used cannot sign fat binaries. Fat binaries are ones with more than one architecture inside. For example, a dual armv6 and armv7 executable. Or with Xcode 4.5, it's probably defaulting to arvm7and armv7s.

In the project build settings, use the ArchitecturesValid Architectures and Build Active Architecture Onlysettings to determine which architecture executable is built. For jailbreak development, I usually set Build Active Architecture Only to YES. And valid archictures set to armv6 and armv7.

3) Also, some older versions of ldid cannot sign armv7 executables. If you get the pre-built copy from KennyTM's site here, it supports armv7. Note that this ldid is built for Mac OS X, so it's designed to be run on the executable on your Mac, after building without signing in Xcode, but before you upload to your iPhone.

Newer phones can generally run executables built for older architectures, but not the other way around. So, build for the oldest architecture you want to support. You just will lose some optimizations in the newer architectures (which most people don't care too much about ... let me know if your app needs these optimizations, and I'll post more).

So, if you want to support old devices (iPhone < 3GS), I would set Architectures to onlyarmv6, making sure to remove the default setting of $(ARCHS_STANDARD_32_BIT). If you only need support for relatively new ones, then pick armv7, but make sure you use a version of ldid that can sign armv7 binaries.

Edit: to determine if the executable you were trying to sign was a fat one, run this at the command line:

> cd HelloJB.app

> ls

HelloJB     Info.plist  PkgInfo     date.zip    en.lproj

> lipo -info HelloJB 

Non-fat file: HelloJB is architecture: armv7

As you can see in the above output, my HelloJB executable is not fat, and only has armv7 code.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值