Appium Appium IOS 真机测试,总是闪退应用

梦桥 · 2015年04月15日 · 最后由 陈恒捷 回复于 2015年04月15日 · 1694 次阅读

从代码里运行 appium,应用起出来之后闪退,
appium log 报如下异常:

info:[debug] [INST STDERR] instruments Device 'Build Version 11B554a,IPhone ID f4************' is not step as a development device .Use Xcode to step.
info:[debug] [INST STDERR] instruments Permission to debug com.xxxx.xxxxx was denied , The app must be signed with a devepoment identity (e.g. iOS Developer)
info:[debug][INST STDERR] Instruments Trace Error:Error Starting Recording
info:[debug] INSSERVER] Instruments exited with code 253

Java 代码如下:

File app = new File("xxxxxx.ipa");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MyCapabilityType.APP,app.getAbsolutePath());
capabilities.setCapability("udid"."**********************");
capabilities.setCapability(MyCapabilityType.PLATFORM_NAME,"ios");
capabilities.setCapability(MyCapabilityType.DEVICE_NAME,"iPhone");
IOSDriver ios = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
共收到 5 条回复 时间 点赞

这句话不是告诉你了吗:

instruments Permission to debug com.xxxx.xxxxx was denied , The app must be signed with a devepoment identity (e.g. iOS Developer)

#1 楼 @chenhengjie123
ipa 签名,找了半天也没有开发证书签名方式啊

#1 楼 @chenhengjie123 这个 ipa 通常都是用企业证书签名的,所以报 “The app must be signed with a devepoment identity (e.g. iOS Developer)” 这个错误,应用起出来然后立刻闪退

这个签名不是在打包的时候设置的,是在应用里的 Provisioning Profile 选项里面设置的。
你用这个错误信息去 stackoverflow 搜一下就有详细答案了。

用 xcode 打开工程,进入 build setting->Code Signing,将证书设为开发者证书

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册