iOS simulator not responding - ios

Using both Xcode 4.4 and 4.5, I can't get the iOS simulator to actually start. It used to work, but one day it just stopped without any reason. I've tried reinstalling Xcode many times and rebooting, but to no avail. It just sits there bouncing away in the Dock, almost taunting me. Running my app on an actual iPad works fine, though. What could be causing this?
Here's the output I get from force closing it.
EDIT: it works now. The only thing I did was delete com.apple.finder.plist in ~/Library/Preferences to fix my Time Machine not working. Whether or not it was actually this that did it, I don't know, but it works now.

Related

Launching app on iOS Simulator (waxsim no longer works)

I've had a workflow for a while that ran automated tests by building an app for the simulator, then launching it using waxsim. On every new sdk release there were some small tweaks to keep it working. However, XCode 5.1 removed the iPhoneSimulatorRemoteClient framework, so waxsim no longer works.
I tried using the ios simulator from the command line directly, as in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication /mydir/myapp.app/myapp
However myapp does not run, I just get the simulator loading the home screen. I can't figure out what might be going wrong, since I can't find a way to get any verbose output - the simulator does not complain about anything, it just doesn't load my app.
Any ideas, thoughts? Perhaps an alternative to waxsim that works on Xcode 5.1?
ios-sim was recently updated to support the new private framework DVTiPhoneSimulatorRemoteClient that is present in the current Xcode/SDK. I tried it and it seems to work fine, so I pretty much answered my main question.
Still, if someone has an idea why -SimulateApplication does not work (when the same app launches fine with ios-sim), I'd be curious to find out.

Xcode does not run the app on simulator. (App exited unexpectedly)

I'm developing for iPad (iOS 7), using Xcode 5.0.2.
Yesterday morning I was playing around with the app (my first app) and every time I ran it, it was displayed in the emulator perfectly. But after some 5/6 runs Xcode just stopped launching my app in the simulator. I started to receive this message:
MagazineManager exited unexpectedly - lost connection
Image:
I've been researching since yesterday morning for a solution with no luck. I even uninstalled and reinstalled Xcode, cleared the cache, delete folders... all that drama thinking it could be some sort of cache problem.
Then, going online I've tried lots of "solutions", none worked.
I've tried all listed here: Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."
and here:https://discussions.apple.com/message/23431537#23431537
and in more places.
After all my "try this, try that" I'm stuck with the same problem. I can only see a black screen at the simulator (image below) and that message at Xcode!
In my extensive research I've read that people are still able to debug using their iPad's. The problem is that I got the new iPad air, that's only getting here dec, 20th!! So I don't have a place to test my app[s].
Thanks!
UPDATE
Just got this message in the debugger console:
013-12-09 20:23:25.902 sim[607:303] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin/sim: Did not find an executable file at the path: '/Users//Library/Developer/Xcode/DerivedData/MagMan-bvhhiijesvrvuteunbmpsxcqgsst/Build/Products/Debug-iphonesimulator/MagMan.app'
My problem was the debugger. Actually, it still is.
The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.
I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.
This is how I disabled the debugger:
Project > Edit scheme
Set Debugger to None
If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.
Again, thanks for all your time and patience, specially #Popeye and #HotLicks that spent a lot of their time trying to help me.
Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:
iOS Simulator --> Reset Content and Settings...
This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.
UPDATE
The answer on XCode5 can't install app on iOS simulator indicates the following
I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy
If that doesn't work leave a comment and I will have another look.
Delete the app and restart your iPad it will work

xcode run app and crash without error(only lldb). Why? [duplicate]

I've been struggling with an weird issue for some time now. When running my app with the iOS Simulator initially closed it launches correctly. But if I then run it again without closing the simulator it crashes and just prints (lldb) in the error log. If I then run it again (without closing the simulator) it launches correctly. And if I do the same again it crashes. So it seems to be every second time. It works when using a iOS device and I have a college with the exact same project who doesn't experience this problem in the iOS Simulator. What I've tried is cleaning, reset contents and settings, manually removing the app, restarting my computer and reinstalling Xcode.
There's an issue with OS X 10.8.4 that causes random simulator crashes.
https://devforums.apple.com/message/817179#817179
A couple of workarounds have been suggested, including switching to GDB. See here:
We have found the issue. It is a process killing race condition in
"debugserver" when it is killing the application it is debugging which
causes this problem to occur.
The work around that should work for
all folks is to kill the app first, wait for it to go away, then hit
CMD+R. The quick turn around of just pressing CMD+R is now showing
this thread race condition more often in 10.8.4.
Apple resolved this issue in June 13th, 2013 build:
Yes, I meet it too. In Product -> edit scheme change the debugger from lldb to gdb. Can simply solve it. Hope Apple can fix it asap.

Logging suddenly stopped working in iOS app with xCode 4.6

I am using xCode 4.6. I upgraded when it first came out, with no problem.
Today, logging suddenly stopped working in my app. It has been logging no problem since I first created the app (years ago), then today it just stopped.
I have tried:
*Cleaning the project
*Deleting the derived data
*Closing and restarting xcode
*Deleting the app from the simulator
*Resetting the simulator
*Searching to see if NSLog (or DLog, as I am mostly using, though I do use some NSLog as well) was redefined somewhere (they weren't)
I have looked at other posts on this site, and they have not helped the solve the problem. I really do not know what to do from here.
You may need to choose Debug Configuration in Schema Info.

Why does my app work in the simulator but get stuck on the splash screen when I run it on my iPhone?

My app runs fine on the simulator. However, when I run it on my iPhone, it gets as far as displaying the splash screen and then just stays there. It's an iPhone 3GS and the software version is 5.0.1. That's what happens when Debugger = None. When Debugger = GDB, I get an error message, 'Thread 1: Program received signal: "SIGABRT"', which I have learned can mean almost anything. I'm running Xcode 4.2.1.
I'm coming off a long hard night of battling with this error message, which appeared seemingly out of nowhere in a stable mature app. I tried to roll back with time machine, I deleted the Derived data for my project in Organizer a few times and did some of the other stuff recommended in this thread.
XCode 4 hangs at "Attaching to (app name)"
It got ugly. For a while, I couldn't even reboot my machine. Eventually, I was able to relaunch finder and suddenly the Simulator was working again. Two more pieces of information, I used to have to click allow in two dialog boxes when running on my phone but now it's only one (the one about code signing, I forget what the other one was about). Second, I find all the build architecture target stuff confusing but I set all my Base SDKs to be latest iOS. Lastly, I tried Product --> Clean and then Build but that didn't fix it. As you may have gathered, I'm getting my butt kicked. Any help would be much appreciated.
Dessie
Many times I have experienced Xcode going "crazy" with a physical device connected. At times I saw the behavior you describes; other the app simply refused to start;
In all of those cases, I could fixed it in either of two ways:
disconnect the iphone and connect it again;
reboot the device.
This is a very common problem that is easily fixable.
1) remove the app from the device
2) reboot the device
3) close Xcode and you must restart, logging out will not work

Resources