**

机器配置环境是:XCode 7.3 系统 :OS X 10.11 Node.js 6.2.2

**

很感谢,各位大神的帮助,换了一个用模拟器编译的.app 文件,已经可以正常打开了。
可是问题接踵而来,用来写脚本的控制器无法自动打开。
当 app 正常打开后,启动器就一直在 “转转转” 了,然后就弹出提示。

Log:

[debug] [iOS] Instruments launched. Starting poll loop for new
commands. [debug] [iOS] Setting bootstrap config keys/values [debug]
[UIAuto] Socket data received (2 bytes)

[debug] [UIAuto] Got a result when we were not expecting one! Ignoring
it [debug] [UIAuto] Sending command to instruments: target =
$.target(); au = $; $.isVerbose = true;

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: [] [HTTP] -->
GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[debug] [Instruments] [INST] 2016-06-23 01:58:14 +0000 Debug:
evaluation finished

[debug] [Instruments] [INST] 2016-06-23 01:58:14 +0000 Debug:
responding with: [debug] [Instruments] [INST] 2016-06-23 01:58:14
+0000 Debug: Running system command #1: /Applications/Appium.app/Contents/Resources/node/bin/node
/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js
/var/folders/0z/6l4x79ds0qd609sl8y71xxfh0000gn/T/instruments_sock
2,{"status":0,"v...

[debug] [UIAuto] Socket data received (27 bytes)

[debug] [UIAuto] Got result from instruments:
{"status":0,"value":true}

[debug] [iOS] Setting initial orientation to PORTRAIT [debug] [UIAuto]
Sending command to instruments: au.setScreenOrientation('PORTRAIT')

[HTTP] <-- GET /wd/hub/status - - ms - -

[HTTP] <-- GET /wd/hub/status - - ms - -

[debug] [Instruments] [INST] 2016-06-23 01:58:15 +0000 Debug: Got new
command 1 from instruments: au.setScreenOrientation('PORTRAIT')

[debug] [Instruments] [INST] 2016-06-23 01:58:15 +0000 Debug:
evaluating au.setScreenOrientation('PORTRAIT')

[debug] [Instruments] [INST] 2016-06-23 01:58:15 +0000 Debug:
target.setDeviceOrientation("1")

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: [] [HTTP] -->
GET /wd/hub/status {} [MJSONWP] Calling AppiumDriver.getStatus() with
args: []

[debug] [Instruments] [INST] 2016-06-23 01:58:16 +0000 Debug:
evaluation finished

[debug] [Instruments] [INST] 2016-06-23 01:58:16 +0000 Debug:
responding with:

[debug] [Instruments] [INST] 2016-06-23 01:58:16 +0000 Debug: Running
system command #2:
/Applications/Appium.app/Contents/Resources/node/bin/node
/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js
/var/folders/0z/6l4x79ds0qd609sl8y71xxfh0000gn/T/instruments_sock
2,{"status":0,"v...

[debug] [UIAuto] Socket data received (33 bytes)

[debug] [UIAuto] Got result from instruments:
{"status":0,"value":"PORTRAIT"} [debug] [iOS] Waiting for app source
to contain elements [debug] [UIAuto] Sending command to instruments:
au.mainApp().getTreeForXML()


在点击放大镜启动模拟器后,模拟器中的 app 连续闪退闪开,然后模拟器就自动关闭,重新启动了,不断重复。
只想测试 iOS 的,所以单独之配置了 ios 所需要的环境,尝试过换低版本的模拟器,以及不同的机型,均不能处理这个问题。
如图所示:




下面是日志:

Log:

[debug] [iOSSim] Building bundle path map

[debug] [iOSSim] Building bundle path map

[debug] [iOSSim] Could not find app directories to delete. It is
probably not installed

[debug] [iOSSim] Killing any simulator daemons for
BC881B32-7B61-4F80-B22E-EE3DF18A9B32

[iOSSim] Cleaning simulator BC881B32-7B61-4F80-B22E-EE3DF18A9B32

[HTTP] <-- GET /wd/hub/status - - ms - -

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] <-- GET /wd/hub/status - - ms - -

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[HTTP] <-- GET /wd/hub/status - - ms - -

[debug] [iOS] Not setting locale

[debug] [iOS] No iOS / app preferences to set

[debug] [iOSLog] Starting iOS 9.3 simulator log capture [debug]
[iOSLog] System log path:
/Users/mingo/Library/Logs/CoreSimulator/BC881B32-7B61-4F80-B22E-EE3DF18A9B32/system.log

[debug] [iOS] Not pre-launching simulator

[debug] [iOS] Starting UIAutoClient, and launching Instruments.

[debug] [UIAuto] Instruments socket server started at
/var/folders/0z/6l4x79ds0qd609sl8y71xxfh0000gn/T/instruments_sock

[debug] [Instruments] Instruments is at:
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments [debug]
[Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments

[debug] [Instruments] Attempting to run app on iPhone 6 (9.3) [
[Instruments] On xcode 7.0+, instruments-without-delay does not work,
skipping instruments-without-delay

[debug] [Instruments] Found Insruments-Without-Delay:
/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7

[debug] [Instruments] Spawning instruments with command:
'/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t
/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate
-D /var/folders/0z/6l4x79ds0qd609sl8y71xxfh0000gn/T/appium-instruments/instrumentscli0.trace
-w "iPhone 6 (9.3) [" /Users/mingo/Desktop/appiumtest/yitian.app -e UIASCRIPT "/Users/mingo/Library/Application
Support/appium/bootstrap/bootstrap-29011722188d9c36.js" -e
UIARESULTSPATH
/var/folders/0z/6l4x79ds0qd609sl8y71xxfh0000gn/T/appium-instruments'
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}


↙↙↙阅读原文可查看相关链接,并与作者交流