3

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:

enter image description here

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!

enter image description here

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'

Community
  • 1
  • 1
eestein
  • 4,914
  • 8
  • 54
  • 93
  • I have seen evidence that OSx runs out of some sort of thread handle, such that you need to reboot your Mac. You can gain a little bit by killing the simulator and then using Activity Monitor to kill off some straggling simulator threads, but this doesn't appear to be a complete fix. – Hot Licks Dec 09 '13 at 22:06
  • @HotLicks just restarted again, no luck. =( – eestein Dec 09 '13 at 22:16
  • There is a directory somewhere that you can clean out, going beyond Clean + Reset Content and Settings, but I can't remember where it hides. – Hot Licks Dec 09 '13 at 22:27
  • Can you run *any* app on the simulator? Like create a new blank app with a single view controller, and run it? – TotoroTotoro Dec 09 '13 at 22:29
  • Have you tried a different version of the simulator? – Hot Licks Dec 09 '13 at 22:33
  • @BlackRider only for the first time I see changes, but still with the popup error. I have to stop debugging, go home on the emulator and then click the app to have it opened. – eestein Dec 09 '13 at 22:36
  • @HotLicks No, how do I do that? – eestein Dec 09 '13 at 22:37
  • The "Scheme" button to the right of the Stop button. Click the RIGHT side of it and you can select among installed devices and simulator versions, and select new simulator versions to install. – Hot Licks Dec 09 '13 at 22:43
  • Most of the time quitting the simulator and running again already solves the problem.. so most of the time no need to reset all settings or delete apps – lukaswelte Dec 09 '13 at 22:49
  • @HotLicks same error on all versions! I'm close to give up here and wait for the iPad, see if this goddam** thing works! =( never thought I'd have such a trouble with an apple product, I just love VS more and more now. – eestein Dec 09 '13 at 22:55
  • @HotLicks the problem IS the frea**** debugger =O I was just meddling with your instructions (edit scheme) selected no debugger and now I can see my app! At least that! I guess I should settle for better than nothing at this point. – eestein Dec 09 '13 at 22:59

3 Answers3

5

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:

  1. Project > Edit scheme
  2. Set Debugger to None

enter image description here

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.

eestein
  • 4,914
  • 8
  • 54
  • 93
4

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.

Community
  • 1
  • 1
Popeye
  • 11,839
  • 9
  • 58
  • 91
  • Done it countless times yesterday and today, no luck =( – eestein Dec 09 '13 at 21:02
  • Have you tried restarting the Mac? Could you add that to your question as well as we need to know everything. – Popeye Dec 09 '13 at 21:03
  • Yes, few times in this period. As mentioned I even reinstalled Xcode and after that restarted the mac. – eestein Dec 09 '13 at 21:03
  • I've seen that answer yesterday and tried that as well. Still doesn't work. I even created a new project that does not work. Not one new project works. Even after reinstalling the Xcode. – eestein Dec 09 '13 at 21:08
  • 2
    Again please include this in your question I am just pointing you to things you have already looked at and wasting my time. Please share everything. – Popeye Dec 09 '13 at 21:09
  • Have you also seen http://stackoverflow.com/questions/19720658/xcode-5-builds-and-archives-but-wont-run-or-test-mac-apps – Popeye Dec 09 '13 at 21:10
  • I've fixed something like this a while back by doing some combination of (1) cleaning the build folder, which I assume you already tried and (2) changing the debugger from LLDB to GDB. Not sure if that helps or is relevant but I thought I'd mention it! – Anton Dec 09 '13 at 21:10
  • I understand, but if I would do that I need a 10 mile page to share all links. Basically I've tried anything that Google brought with the keywords "app exited unexpectedly lost connection". I appreciate the help anyway. – eestein Dec 09 '13 at 21:10
  • @Popeye yes, I've seen and even tried that before finding that question. – eestein Dec 09 '13 at 21:11
  • @Anton I didn't do this changing the debugger. Will look into that. Thanks. – eestein Dec 09 '13 at 21:12
  • @Anton GDB is the older debugger which is no longer available in `xcode 5` LLDB is the debugger Apple want developers to use. – Popeye Dec 09 '13 at 21:16
  • @Anton as Popeye said, I didn't find anything under preferences -> edit scheme – eestein Dec 09 '13 at 21:17
  • @g.Raam I'm sorry but I'm stuck have you got anything else to share. Is there any error message at in the console? – Popeye Dec 09 '13 at 21:18
  • @Popeye Thanks, I haven't been as up to date with XCode since v5. g.Raam good luck figuring this out, I feel your pain! – Anton Dec 09 '13 at 21:19
  • No, but since it's my first time with Xcode I could be wrong though. I just checked the debug console and there's no message at all, just the message and the simulator with the black screen. Is there a place I could see more info on this error? @Anton thanks =( – eestein Dec 09 '13 at 21:21
  • Try the bubble icon in the Explorer and see if it tells you more. I just learned about it the other day. – logixologist Dec 09 '13 at 21:24
  • Do you have any issues in the Issues tab in the Explorer? What is in the Debug tab when your app crashes? Can you add expression breakpoint in to see if xcode will land on the line that breaks it (But I'm not sure it is code related) here is a link for setting an expression breakpoint https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/setting_breakpoint_actions_and_options.html – Popeye Dec 09 '13 at 21:27
  • @logixologist thank you, now I have a new error. Popeye here's more info =) SpringBoard failed to launch application with error: -3 I'm googling it right now, as well as reading your new comment. – eestein Dec 09 '13 at 21:29
  • http://stackoverflow.com/questions/19855222/springboard-failed-to-launch-application-with-error-3 – Popeye Dec 09 '13 at 21:30
  • http://ios-journey.blogspot.co.uk/2013/01/clear-xcode-and-simulator-cache.html or http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4 – Popeye Dec 09 '13 at 21:37
  • Nothing... :`( command+shift+option+K or hold option on product menu didn't work as well, that option shows up disabled. I'll try to create a new project now that I deleted all /var/folders and see if it helps in anything, I'm back with the lost connection error, btw. – eestein Dec 09 '13 at 21:53
  • Ok every time I got that error I just exited out of my simulator and ran the app and it would work fine. – logixologist Dec 09 '13 at 22:05
  • Here's a weird thing... If I stop the debugger (after the popup message) and go home on the emulator (cmd+shift+H) and click the app, the app opens up, but as an empty view app. Not sure if this helps, but thought I'd mention. There's a bridge close by, I think I'm gonna jump before I lose all my hair xD – eestein Dec 09 '13 at 22:08
  • I got a debugger console error now, I updated my question in case you are still there. Thanks =) – eestein Dec 09 '13 at 22:25
-1

Delete the app and restart your iPad it will work

DineshKumar
  • 1,641
  • 15
  • 13