Appium 1.4.11 - Xcode 7 - iOS 9 runs very slow

We have about 150 test that take about 3 hours to complete. As soon as we upgraded to Xcode 7, iOS 9 and appium 1.4.11 our test are taking 3 times longer than normal. I see that the problem is not being able to run instruments-without-delay. Is there a time frame of when you think this will be working?

2 Likes

The same problem to me~

Facing same issue with XCode 7 and iOS 9 Sims. This is due to facebook instruments-without-delay not supported for XCode 7. I am not sure if they will continue to support this as they have this --> https://github.com/facebook/FBSimulatorControl now which I think they use for their tests.

Check the issues list here --> https://github.com/facebook/instruments-without-delay/issues

I am not sure about workaround that works currently and reliably.

Yeah I looked into that and tried setting the environment variables like they suggested and it just seemed to cause more issues than it was worth. I guess I am forced to wait until Apple or Appium fixes the issue since I don’t want to put in some patch/hack to get it working. Then each time I update I am going to have to redo this fix. I am at the point that I may switch to use Apple and Androids built in testing suites inside of Xcode and Eclipse to fix this slowness if nothing is going to be done to fix it.

We are looking at moving away from appium and use xcode ui automation directly as a result of the slow interaction with ios.

I used this solution to fix the slowness of iOS.

Use vicwomg suggestion in the comments below. I am back to normal speeds on iOS now.

https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/iwd_xcode7.md

1 Like

@moizjv , do I need to rerun npm install for appium package ? , actually I did it in order to get updated appium ver , but the xcode_iwd.sh file wasn’t downloaded …

What I’m missing here ?

thanks

I have same question. Last week I updated appium to 1.4.14 and xcode_iwd.sh is not there. Any clues how to add it?

Same with 1.4.15 version. Should i just copy this script and create in appium bin directory?

@stefan it seems that in 1.4.15 the file is there

tried it just now , works like a charm !!

Thanks appium guys

do we need to execute it once or before each test?

did i understand correctly that needed to enter:
'sh /Applications/Appium.app/Contents/Resources/node/lib/node_modules/appium/bin/xcode_iwd.sh /Applications/Xcode.app appium in mine case?

tried and got: /Applications/Xcode.app: /Applications/Appium.app/Contents/Resources/node/lib/node_modules/appium/bin/xcode_iwd.sh: Permission denied

then did: chmod 700 /Applications/Appium.app/Contents/Resources/node/lib/node_modules/appium/bin/xcode_iwd.sh

and now:
sh -c /Applications/Appium.app/Contents/Resources/node/lib/node_modules/appium/bin/xcode_iwd.sh /Applications/Xcode.app appium
File Doesn’t Exist, Will Create: /Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist
File Doesn’t Exist, Will Create: /Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist
File Doesn’t Exist, Will Create: /Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist

Do you know which appium path should passed when I’m using appium from command line?

Thanks a lot! Which appium path you used for this scrpit?

sh ./xcode_iwd.sh /Applications/Xcode.app /usr/local/lib/node_modules/appium

Is there a way to know if the appium server is running with this library? I can’t seem to get this to work and it looks like my plist is exactly the same except for the appium path.

Dict {
Program = /Developer/Library/PrivateFrameworks/DVTInstrumentsFoundation.framework/DTServiceHub
EnvironmentVariables = Dict {
LIB_PATH = /Users/Ben/repos/appium/node_modules/appium-instruments/thirdparty/iwd7/
DYLD_INSERT_LIBRARIES = /Users/Ben/repos/appium/node_modules/appium-instruments/thirdparty/iwd7/DTMobileISShim.dylib
}
JetsamProperties = Dict {
JetsamMemoryLimit = 0
}
POSIXSpawnType = Adaptive
MachServices = Dict {
com.apple.instruments.deviceservice.xpc = true
com.apple.instruments.deviceservice.lockdown = true
}
EnableTransactions = true
Label = com.apple.instruments.deviceservice
}

Should something like the following be displayed in the server log? I’m not seeing them, but I’ve seen other peoples’ logs displaying this and was wondering if I’m doing something wrong and that’s why I’m not seeing it.

debug: And extra without-delay
env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd”}

thanks! but same result.

i have Appium 1.4.14 installed with “npm install -g appium” and GUI client also.

I had to down grade to Xcode 7.0.1 inorder to use this. Xcode 7.1 runs really slow still.

@DexRobinson have you tried to execute the xcode_iwd.sh script ?

Since I’ve run it , the execution time , backed to normal