Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 无法预启动appium,且应用程序不';t使用appium安装在iphone real设备中 我使用的是appium版本1.3.7 我已经通过usb连接了物理设备 我已经启动了appium服务器,一段时间后appium崩溃了 我已经把完整的日志贴在下面了 我已附上下面的屏幕截图_Ios_Appium_Inspector - Fatal编程技术网

Ios 无法预启动appium,且应用程序不';t使用appium安装在iphone real设备中 我使用的是appium版本1.3.7 我已经通过usb连接了物理设备 我已经启动了appium服务器,一段时间后appium崩溃了 我已经把完整的日志贴在下面了 我已附上下面的屏幕截图

Ios 无法预启动appium,且应用程序不';t使用appium安装在iphone real设备中 我使用的是appium版本1.3.7 我已经通过usb连接了物理设备 我已经启动了appium服务器,一段时间后appium崩溃了 我已经把完整的日志贴在下面了 我已附上下面的屏幕截图,ios,appium,inspector,Ios,Appium,Inspector,您可以使用Appium在设备上安装应用程序,只需手动卸载应用程序,并在安装代码中使用.apk文件的绝对路径,如下所示: DesiredCapabilities=新的DesiredCapabilities() 能力。设置能力(“平台名”、“安卓”) 能力。设置能力(“版本”、“5.1.1”) 能力。设置能力(“设备名称”、“名称”) File appDir=新文件(“/home/filename/ProjectFile”) 文件app=新文件(appDir,“appname.apk”) setCa


您可以使用Appium在设备上安装应用程序,只需手动卸载应用程序,并在安装代码中使用.apk文件的绝对路径,如下所示:

DesiredCapabilities=新的DesiredCapabilities()

能力。设置能力(“平台名”、“安卓”)

能力。设置能力(“版本”、“5.1.1”)

能力。设置能力(“设备名称”、“名称”)

File appDir=新文件(“/home/filename/ProjectFile”)

文件app=新文件(appDir,“appname.apk”)

setCapability(“app”,app.getAbsolutePath())


它将在您的设备上安装您的应用程序

您说您尝试在真实设备上启动,但您的日志说您尝试在模拟器上启动


如果您使用的是appium的UI版本,请取消选中appium中的强制设备选项,并给出您在appium和预启动中连接的真实设备的UDID。您的应用程序将被安装。

根据日志,appium无法安装该应用程序。您是否尝试手动安装此应用程序?@Eugene,此应用程序已手动安装到物理设备中。
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --pre-launch --platform-version "8.1" --platform-name "iOS" --app "/Users/al/work/sample.app" --udid "f5de3fd5ccded92e40e86c652ce2a6f9414fe1a0" --device-name "iPhone 4s"

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app

info: [debug] Using local app from command line: /Users//al/work/sample.app
info: [debug] Creating new appium session 1cdc5dc0-36d2-40b9-922b-33601f28846b

info: [debug] Removing any remaining instruments sockets

info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] Getting sdk version from xcrun with a timeout

info: [debug] iOS SDK Version set to 8.1

info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim

info: [debug] Parsed app Info.plist (as binary)

info: [debug] Parsed app Localizable.strings
info: [debug] Getting bundle ID from app

info: [debug] Parsed app Info.plist (as binary)

info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/alk/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/alk/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js

info: [debug] Reusing dynamic bootstrap: /Users/alk/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 4s","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 4s (8.1 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences

info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator

info: [debug] Killing any other simulator daemons

info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set

info: [debug] Starting iOS device log capture via deviceconsole

info: [debug] Not pre-launching simulator

info: [debug] Creating iDevice object with udid f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2

info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle com.vr.iphone.sample

info: [debug] App is not installed. Will try to install the app.

info: [debug] Installing app using cmd: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/Users/al/work/sample.app

info: [debug] Cleaning up appium session

error: Could not pre-launch appium: Error: Unable to install [/Users/al/work/sample.app] to device with id [f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/Users/al/work/sample.app"
Assertion failed: (AMDeviceStartService(device, CFSTR("com.apple.afc"), &afcFd, NULL) == 0), function handle_device, file fruitstrap.c, line 523.
]