I just to upgraded OS X to maverics and to xcode 5.
Now I can't launch my app which was running just fine on iOS 6.1 simulator, now I only see black screen both on simulator (I tried 6.0, 6.1 and 7.1), and also on a real device.
I put breakpoint into main function in my main.m and it is not called.
How can I debug this further? I googled this, and did all suggestions like resetting simulator, reinstalling xcode, deleting /Library/Application Support/iPhone Simulator/* nothing helped.
Also, if I start new app from scratch in xcode it runs fine.
SOLVED: Actually the problem was that debugger was not attaching to the process, so I did not see what was happening (also console showed nothing), and app did stop launching due to some exception in my code.
Double click on the simulator icon on the dock (multiple times if required), sometimes it doesn't attach well to the process of the simulator.
If it still doesn't work, go back to home screen (cmd + shift + h), and touch your app again: XCode should then attach!
Related
I am using Xcode 10.0 on macOs 10.13.6, in past several days I am facing issue on xcode simulator that "Simulator shows black screen always" Even not showing boot screen when device boot or simulator boots
Xcode still shows Launching, Attaching application to simulator
Even XCode shows Running of on Device still black screen
Note: It is not issue of lock button simulator tried it also.
Tried multiple solutions including Simulator > Reset content and setting. ,
Delete Derived Data, Tested on different simulator of different iOS Versions, Checked with multiple Projects
None of above solved my problem, I can run application on only my personal physical Device, Attached Image on links
I use Xcode 7.2. I click Build to run the iPhone 6 PLUS simulator in Xcode it tells me "running app on iPhone 6 Plus". The simulator icon appears and it either just jumps up and down and never stops. Or it stops jumping I open it it's a black simulator screen with a white apple symbol. Then I wait 5-10 minutes and it never loads the app. Sometimes it loads up to home screen in simulator but then again never loads the app.
What could be the reasons for this iPhone simulator not working?
Do you have the simulator open from a beta version? That will stop the simulator from working in a non-beta version (or vice-versa).
I'd also open up Console.app and see if there is anything in the logs with a reason why it might not be running.
Has anyone seen this before? Ever since I upgraded to Xcode 4.5.2, sometimes when I press Command-R to run an app in the simulator, the status in Xcode says "Running", but the app never starts in the simulator. When I press Command-., it says it is trying to stop, but never stops. Xcode basically is hung, I have to force quit. Hopefully there is a simple solution?
Try opening the simulator and deleting the application. Also try closing and re opening xcode. If this does not try restarting your computer. If you are still having the problem then you will have to uninstall xcode and reinstall it. (I have had that problem multiple times)
Strange, but works. Click on the 'iOS Simulator' icon in the Dock (https://stackoverflow.com/a/10277189/1514970).
This tends to work. I use Serge's find to click the icon in the dock - this then "wakes up" XCode to the fact that it needs to attach to the app in the simulator. Even though the attach never happens, a Command-Period at this point stops XCode without hanging it and having to do a Force Quit. Then, I can close down the Simulator, and do Command-R to run from XCode. This relaunches the simulator and attaches to the app process.
I have been having this weird problem with Xcode 4.3.2, of course after the recent update.
After successfully building and running on the simulator several times, xcode seems to not be able to connect to the simulator and can't even stop the project; it's like the simulator does not exist. I have tried:
Stopping the project – doesn't work.
Quitting the simulator – doesn't work, xcode still shows it's running on the simulator even when I quit the simulator.
Cleaning the project – doesn't work.
I have to force quit xcode to get it communicate with the simulator. Nothing else works. It gets quite frustrating to do it every half an hour. This only started with 4.3.2.
I always stop before building and running, so it is not an issue of simulator/xcode getting thrashed by me.
Any suggestions?
I have found by chance, it is not a solution by any means -
When xcode hangs, saying it is running the app, but nothing is on simulator, opening the simulator from the dock by clicking on the dock icon (not using command+tab) seems to work.
It is very weird,but it works; atelast till xcode fixes it.
I had the same damn issue on XCode 4.5.1, but I resolved it just now.
When the program is running, it gets compiled but doesn't show anything on the simulator. just click on iOS Simulator icon in dock in order to bring it to front. Click iOS Simulator on top left -> Reset content and settings -> then force quit the iOS Simulator and run the program again. !!
Besides a restart, there is one other way I've managed to get around this:
Let's say your app hangs, go to the targets selector in the top of the Xcode window and change your sim target to a new SDK (or if you don't have another SDK, change it to a universal app and run on the opposite device simulator).
Then, when your app loads on the new device/OS completely, quit the sim, change your targets back, et voilà!
Uninstall application from Simulator and again run. Then it will works fine :)
This has frustrated me for -years- now but stumbled across what appears to get things going again for me:
Hide the simulator (iOS Simulator -> Hide iOS Simulator) or Cmd-H, then reopen the simulator.
The problem seems to happen when something CPU intensive is happening in the background (like a Time Machine backup) on my old 2 core MacBook.
Xcode 4.6.3 update (June 13, 2013) resolves the following issue:
Hang when debugging in iOS Simulator on OS X 10.8.4. 13722320
https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/
You can try to update your Xcode to see if that works for you..
My app runs fine on my physical device (iphone 4), it also runs fine on the IOS simulator, but only after the second time I ty to run it from Xcode.
So the sequence in which things are happening is:
IOS simulator closed.
I press "ctrl R" in XCode
IOS simulator starts, app starts but gets no further then the splash screen (does
not crash it just sits at the splash screen)
I press the stop Button in Xcode (app stops running in Simulator)
I Press "ctrl R" again
App starts in IOS simulator and runs like a charm..
If I close the IOS simulator reopen open it from finder and run the installed version, it runs without problems.
Two questions,
has anyone had a similar experience?
am I in trouble when submitting my app to the appStore
Thnx, Sebastian
The problem went away when I removed the majority of my logging messages (I had ton's of them). So either there was an issue with one of the messages or it had to do with the amount of them , hope this helps anyone who experiences the same problems.