@mweiss88 it's because instruments-without-delay is turned off for xcode 7.1. I have twist the appium source code a bit to turn it on for xcode 7, and do as: https://github.com/lawrencelomax/instruments-without-delay/tree/xcode7-quirks#xcode-7--ios-9-support22
Currently it's the only workaround that I know for this
@tbao thanks, I'll give that a try when I get the chance (will be a few days). Obviously a permanent fix in appium would be ideal but thanks for the work around!
@tbao can you share how you got it working?
@moizjv Maybe you got me wrong because all I did is just follow this: https://github.com/lawrencelomax/instruments-without-delay/tree/xcode7-quirks#xcode-7--ios-9-support13. I just modified the plist and it works.
Hopefully you can find better solution for this instead of modifying the plist
Hi @tbao I also have problem with it.
It is clear that environment variable should be adde to plist file.
But how to do it step by step?
Could you explain it more extendedly?
Thanks.
@Degard Here are the steps that I did:
1. Checkout this project: https://github.com/lawrencelomax/instruments-without-delay20 first. Make sure you can open it by Xcode and build it successfully.
Back up this file: ./Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist ( I assume your Xcode is installed in the same directory of mine, otherwise you can do a search from Xcode directory with file name "com.apple.instruments.deviceservice.plist")
Open that file and add this key - dict:
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_INSERT_LIBRARIES</key>
<string>/Users/tbao/Developer/tools/appium/instruments-without-delay/build/DTMobileISShim.dylib</string>
<key>LIB_PATH</key>
<string>/Users/tbao/Developer/tools/appium/instruments-without-delay/build</string
</dict>
Note: You have to change the values for the two keys DYLD_INSERT_LIBRARIES, LIB_PATH according to your checked out instruments-without-delay project.
Now try to run appium again and see if it works. To be frankly, how the author of this project solves the problem is still a mystery to me but at least it works for me. Let me know if you have any problem and I'll try to get back to you when I have time
@tbao Thank you, It works for me now.
@willchen I have the same issue too. So I had a workaround that I keep 2 version of xcode installed on my machine. If i want to run automation with ios 8.x then I switch to xcode 6.
I know this is an ugly solution but currently it's the only choice for me. If someone can propose a better solution then I would be appreciated.
@tbao How do you install two versions of Xcode on the Mac? I'm new with the Mac, please provide detail steps on how to do that. I like to do that too in the future when there's upgrades too. Thanks for your help.
@seleniumappiumnewbie I am not sure if there is other post related to this on Appium forum already. But here are the steps that I did anyways:
1. Download Xcode 6 as mentioned at: http://stackoverflow.com/questions/4839526/where-to-download-older-xcode-versions4. ( Assuming your latest xcode version is 7)
2. Install xcode 6 with the .dmg file, remember to choose "keep both" option, otherwise it will overwrite your installed xcode 7. Then rename your newly xcode directory to "Xcode-6" (it is located at /Applications)
3. Run the command: sudo xcode-select -switch /Applications/Xcode-6.app/Contents/Developer. This will set your default xcode command line to xcode 6. You can check if it is switched correctly by running: xcodebuild -version
4. Now open your xcode 6 and open your project and build it.
5. Run appium and your environment should be updated with xcode 6 configuration.
NOTE: to switch to the latest xcode version ( 7 in this case), run this command: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
@moizjv It would be great if you can review and put my post into the appium docs. Thanks
@tbao,
I can't use instruments-no-delay with Xcode7.
I add
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_INSERT_LIBRARIES</key>
<string>/Users/amakhov/instruments-without-delay/build/DTMobileISShim.dylib</string>
<key>LIB_PATH</key>
<string>/Users/amakhov/instruments-without-delay/build</string
</dict>
to /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist file, but iwd still not working.
Do I forgot something to do?
What is in your /usr/bin/instruments file?
@makhov You would try these steps as:
- Try to checkout the correct project at: https://github.com/lawrencelomax/instruments-without-delay5 and build it with your xcode
- Verify if com.apple.instruments.deviceservice.plist is configured correctly
- If it still does not work, I think there is a possibility that you are using Xcode beta and there is something inconsistent. Try to install the official Xcode and redo every step again.
This solution is working for me and someone as well so I think it should work for you if you follow the steps correctly