[iOS9 UIAutomation] What is Appium approach to UIAutomation deprecation by Apple

Hi,

I think there is a bug in appium-instruments for bin/xcode-iwd.sh.

It adds and sets environment variables including the word string for both DYLD_INSERT_LIBRARIES and LIB_PATH. If you edit the plist after running the shell script, the simulator will run without delay.

The resulting com.apple.instruments.deviceservice.plist includes:

<key>DYLD_INSERT_LIBRARIES</key>
<string>string ~/.nvm/versions/node/v6.3.1/lib/node_modules/appium-instruments/thirdparty/iwd7/DTMobileISShim.dylib</string>
<key>LIB_PATH</key>
<string>string ~/.nvm/versions/node/v6.3.1/lib/node_modules/appium-instruments/thirdparty/iwd7/</string>

when it should be:

<key>DYLD_INSERT_LIBRARIES</key>
<string>~/.nvm/versions/node/v6.3.1/lib/node_modules/appium-instruments/thirdparty/iwd7/DTMobileISShim.dylib</string>
<key>LIB_PATH</key>
<string>~/.nvm/versions/node/v6.3.1/lib/node_modules/appium-instruments/thirdparty/iwd7/</string>

Here is a script to test it:

#!/usr/bin/env bash

nvm install node
nvm alias default node
nvm use node

node_version=$(node --version)

npm install -g appium
npm install -g wd
npm install -g appium-instruments

xcode_path=“/Applications/Xcode.app”
appium_instruments_path=“$HOME/.nvm/versions/node/$node_version/lib/node_modules/appium-instruments”

sh “${appium_instruments_path}/bin/xcode-iwd.sh” “$xcode_path” “${appium_instruments_path}”