This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
32 / 32
Nov 2015

@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!

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.

  1. 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")

  2. 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

I've got instruments-without-delay working by updating the plist, but it only works for iOS 9.0 simulators. Commands are still taking a long time with iOS 8.1 simulators. Is there some way to make instruments-without-delay work on iOS 8.x simulators?

@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

Thanks @tbao for detailed post. I was thinking to put this in appium docs, do you want to put it here here4? I wil be glad to review it, and get it in :).

@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:

  1. Try to checkout the correct project at: https://github.com/lawrencelomax/instruments-without-delay5 and build it with your xcode
  2. Verify if com.apple.instruments.deviceservice.plist is configured correctly
  3. 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

Hi All,

I have written a small bash script to solve this issue.

Thanks,
Moiz

23 days later

Are you gonna fix it in some release, or it stays this way?

Regards,
Stefan