However, even though I got rid of the temp dir error, my tests were still not running on real device.
The solution that worked for me was the one mentioned on this topic
I have resolved the problem with my brand new iPhone 5S.
Here is what I did: 1. connected the iPhone 5S the machinse2. launched “Instruments” application from XCode (note: the GUI one, not the command line one!) 3. chose my failing device (the iPhone 5s) and SafariLauncher as target for profiling template4. chose “automation” project5. clicked “choose”.
Either now, or after clicking “record” button a pop up appeared that asked me if I want to open XCode enable this device for development. Theoretically this makes little sense, as I did that already, I saw the “developer” menu in phone’s settings, I had the “Enable UI Automation” checked, provisioning profile uploaded… nonetheless I clicked “Yes”.
Xcode devices view opened and I did nothing there, although I saw some settings change in the device console’s output. I switched back to Instruments GUI, clicked “record” and SafariLauncher started on the device.
After that the phone started to work with the command line of the instruments too and I am able to run my tests on the device.
Seems that the device entered a state where “developer” options were halfway enabled, visible in the IOS GUI, toggable, etc but actually not working. Instruments GUI somehow detected and fixed it.
Hope that helps.