“An error occurred while trying to run the script.” in the UI Automation instrument? - ios

When I try to run a UI Automation script on iOS 6 with iphone simulator 6.0 I am getting the following error:
"An error occurred while trying to run the script."
Please Help!
While working fine with iphone simulator 5.1 with ios5.

It is a bug in Xcode. Some suggest the following (didn't work for me, no old iOS folder).
Assuming you have the latest iOS, now this would be iOS7, with latest version 7.0.3.
cd ~/Library/Application\ Support/iPhone\ Simulator/
mv 7.0 old7.0
ln -s 7.0.3 7.0
Some people claim this bug is fixed in different versions of Xcode (looks like it is back in Xcode 5.0.2 with Instruments 5.0.1), so you could try the latest Xcode beta or any version that you think worked on your computer (like Xcode 5.0.1 apparently)
What worked for me, however was to plug in a device and run my project on the iPod/iPhone instead of the simulator and it worked perfectly.

Related

Unable to find any Xcode installations thats supports at least iOS 8.0

I haven't used my development tools for Appecelerator Titanium in a while (Studio and CLI). Now I try to run an existing app in the iOS simulator.
From studio I can not select the iOS simulators.
When I use the CLI and execute: appc run (platform iOS) i get this message:
Unable to find any Xcode installations thats supports at least iOS 8.0
I have Xcode version 9.0.1 installed.
How can i connect Xcode with Titanium again?
The path of the active XCode developer directory (xcode-select -p) is:
/Applications/Xcode.app/Contents/Developer
You're probably on an SDK older than 6.2. xcode 9 isn't supported by older SDK's for obvious reasons. You can either install xcode8 (downloadable from the apple website) or you can upgrade to Titanium SDK 6.2 or higher (6.3 came out, I recommend that)
For information regarding versioning (of everything related to Ti, check the compatibility matrix in the documentation)
Had the same problem today after installed Xcode 9.2, on side of Xcode 9.4.1 and Titanium SDK 7.2.0.GA. Same error message as in the title of this post. As suggested by Patrick De Marta, I've tried
appc run -p ios -T simulator -C x
after that, I could select a simulator and run the app.
Thanks!
What do you get when you execute "appc ti sdk list" from command line ?
I'm not sure if this is your case, but I had a similar problem and solved it by specifying the target simulator with the CLI build option -C
(appc ti info for the list of simulator names )
hope this helps

Unable to run app in Simulator 9.0 using XCode 7.0

When I run my application using XCode 7.0. Everytime I am getting below error. How to fix this issue.
I am using Mac with 10.10.5 . I searched that 10.10.4 later supports XCode 7.0
Please suggest where I went wrong...!
Go to Xcode -> Preferences- Downloads tab. 
Here you will be able to see list of simulator available for downloading.
Download the required simulator.
Restart Xcode
You will be able to run your project on simulator without any issue.
Okay so it seems like the run time components for the simulator are not installed with your version of Xcode (this may have happened when updating or downloading a beta and Xcode got confused).
Try do the Following: Xcode > Preferences > Downloads > Check and Install Now
That should Help, otherwise you can go to itunesconnect or anywhere on the web and download and add the simulator files manually.

iPhone running iOS 8.3 shows up as ineligible in Xcode 6.2

Current setup:
iPhone 6+ updated to iOS 8.2
iMac running Mavericks (10.9) with Xcode 6.2
Deployment target set to 8.2
When I connect the iPhone, it shows up as ineligible.
Also, it shows this warning:
I've tried:
to reboot both iPhone & iMac -> Not solved
to manually select iPhone from: Product > Destination > Ineligible Devices
Many other answers in this question, but all for problems using Xcode 6.3, not 6.2.
I know I can solve this:
upgrading to Yosemite & installing Xcode 6.3
using an iPhone running 8.2
But is there any possibility that mounting the Xcode 6.3 DMG and copying some libs / symlinking something it will work?
Just copy the folder DeviceSupport/8.3 from Xcode 6.3 to Xcode 6.2.
Details:
Download Xcode 6.2 and 6.3, install as /Applications/Xcode_6.2.app and /Applications/Xcode_6.3.app (or similar names)
In both installations, there's a folder Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
In Xcode 6.2, this folder contains packages for iOS 8.2 and many lower versions, but not for 8.3.
In Xcode 6.3, this folder also contains a package for iOS 8.3. In my case, the folder is called 8.3 (12F69)
Copy the iOS 8.3 package from Xcode 6.3 to Xcode 6.2 (this command is one line, of course):
cp -r '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Or even better, create a link:
ln -s '/Applications/Xcode_6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/8.3 (12F69)' '/Applications/Xcode_6.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport'
Now restart Xcode 6.2 and connect your device through USB. Xcode should allow you to test apps on it.
Diego Freniche's solution (copying the whole iPhoneOS.platform folder) was a great help, but when I ran my app from Xcode 6.2, it looked slightly different than it did when I deployed an ipa file on the phone (buttons in wrong positions, status bar display wrong). I guess Xcode got confused and built the app as if it was targeted at a different iOS version.
With this solution (only copy one folder in DeviceSupport), it looks like the app works exactly as it is supposed to. I'll let you know if I encounter problems, but I haven't seen any so far.
A little progress, but this is a WIP.
Looks like in Yosemite Xcode 6.2 works correctly with 8.3 devices. Need to test on Mavericks
Testing with Xcode 6.2 in Yosemite (need to test also in Mavericks, any feedback would be appreciated)
Go to your Xcode 6.2 folder and rename
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform
into
/Applications/Xcode-6.2 copia.app/Contents/Developer/Platforms/iPhoneOS.platform.old
Mount your Xcode 6.3 DMG, install it
Copy from Xcode 6.3 this folder:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
inside your Xcode 6.2 folder.
you'll probably find an error telling you rootuser does not own the simulator / OS Platform folder. To solve that just open Terminal, then:
$ cd /Applications/Xcode6.2.app/Contents/Developer/Platforms
$ sudo chown -R root iPhoneSimulator.platform/
$ sudo chown -R root iPhoneOS.platform/
now you can run your app inside your iOS 8.3 device from Xcode 6.2 but you have no simulators in the target tdestination menu
UPDATE: I'm getting weird errors while ibtool tries to compile the storyboards:
/Users/dfreniche/Desktop/Test/Test/Base.lproj/Main.storyboard: The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)
So finally give up and update to Yosemite. If there's any new info on this, please share.
Had the same problem with connecting iOS8.3 devices to Xcode 6.2 on Mavericks. Ok on a machine at work running Xcode 6.4 on Yosemite. Software update on the Mavericks machine doesn't offer any higher version. Looking at the specs of Xcode 6.4 (and presumably 6.3 of the original question) says it requires OS X 10.10 (i.e. Yosemite). So, whether or not you can hack around it, the behaviour you/we are seeing on Mavericks is what Apple intends.
I have the same issue and I don't want to just use the lastest version of XCode for the need of maintaining my old projects. I end up with installing two versions XCode(6.2 and 6.3) to solve this problem. Here is what I did.
Download XCode6.2 install package from apple site
Upgrade the existed XCode6.2 to x6.3
Open my project on XCode6.3 (this time the device can be recognized by XCode, and I think XCode6.3 might have done some updates to your project.)
Close my project, re-install XCode6.2, there will be a prompt saying I have a newer version and if I want to keep both. Click Yes. Then I have two versions of XCode.
After all those steps done, I can finally open my project and use my device in XCode6.2. Hopefully it can help someone.
XCODE 6.3 is out.. It solved my problem.. If you have Yosemite, you can download the 6.4 beta version

The iOS 8.1 simulator runtime is not available error in Xcode 6.1

I was using Xcode 6.0.1 till now and things were fine. Then I upgraded to Xcode 6.1 and tried running my application(which has a deployment target of 7.0) in iPhone 6 simulator. But it shows an error message :
The iOS 8.1 simulator runtime is not available. Download the iOS 8.1 simulator runtime from the Downloads section in Xcode's Preferences
I manually deleted the earlier Xcode (6.0.1) and installed 6.1 from a dmg.
I tried searching across but couldn't find related stuff. Any help would be appreciated.
It is a Mac problem, not an Xcode problem.
Logout the user, shutdown, restart or just reboot Mac. Your Xcode simulator will go back to normal.
For anyone still facing this issue, this command worked for me:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Rebooting did not help me.
Installing/Reinstalling Simulators worked!!
Look under (XCode Preferences-> Downloads -> Components)
Maintain an accurate list of iOS simulators
When upgrading, you may drag around old simulators no longer available with your current version of Xcode. You can clean these by running this command in Terminal:
xcrun simctl delete unavailable
Quit Xcode first just for good measures. From the documentation:
Delete a device or all unavailable devices.
Rebooting my computer fixed this exact issue for me. Same error was thrown for both iOS7 and iOS8 simulators. I'm on OS X 10.10 and Xcode 6.1.
Just had this problem with Xcode 8 beta 5. I downloaded ios8 and 9 simulators, but was not able to run my app. I simply deleted derived data and rebooted my computer. It worked for me.

Instrument fail to run GUI test script in real iOS device from Xcode 4.4

I have an UI automation script which run perfectly fine before I update Xcode to 4.4.
But after I update Xcode to 4.4, instrument hang after 2nd run on actual iOS device (runs ok on simulator).
Anybody have the same problem and found any work around?
I have seen the same behavior. You don't even need a script. All you need to do is start your app with Instruments, stop recording and attempt to start recording again. I have seen this with XCode 4.4 and 4.4.1 while running the app on iPads with 5.0.1 and 5.1.1.
I fixed this problem.
Here is the solution:
I moved xcode 4.3.2 to trash and had only xcode 4.4.1 installed on my machine.
This works like a gem.

Resources