Slow xcode 4 debugger - iphone

I've some issues with the Xcode 4 debugger. While it was working fine before, now I can't run more than 1 build before restarting my xcode. When I run a second build for example after changing some codes the debugger could take like 30 mins and more before showing "build succeeded!" with iphone simulator launch. And in such cases, pressing "stop" button does not stop debugger. So, I've to close xcode and start it again. Now, after many xcode restarts I'm fed up especially as I don't know why it happens. Any idea to help ?

the simulator could still be running, chewing up a large chunk of your CPU, interfering with the compile, and the app restart inside it. Stop your app in the simulator before re-compiling. There must be a way to configure that, but i dont know it. Hope that is your issue (i have had it).
ps. state your config next time (Dev box specifics, XCode version, simulated iOS version).

Related

Xcode simulator shows up as being tiny

I am working on an iOS app in Xcode using Swift, and when I go to run the app in the simulator, it does not display as a normal simulation of the app that I am trying to run. The entire window is less than one inch by one inch, and shows what should be in the middle of the app. I ran it on my phone, and everything worked normally. Any insight into what may be going on? I'm developing the app using SpriteKit, if that provides and clues.
I have a bit of experience with iOS development, but I've never run into something like this before.
Edit: It only happens some of the time. I'm not sure, but I have a hunch that it is the result of some sort of race condition between GameScene and GameViewController
Cmd + 1 or Cmd + 2 should fix the size of the simulator (or Window -> Physical Size or Window -> Point Accurate).

iPhone Simulator Translucent Black Screen and Hangs in Xcode 4.4.1

I have a problem with Xcode 4.4.1 .
My Simulator becomes translucent black and hangs without any proper log message when I pressed a login button of my application after app launch.
Sometimes application or Simulator hangs just after the launch when I pressed the button or Sometimes it hangs after few second I request a network call with in application.
No pattern .. no message to trace. Tried many things like Xcode restart ,System restart and Clear logs and deleting temporary iPhone Simulator files in Library like that .
I am not able to get what is happening . Does anyone suggest me solution to get out of this.
Or Does somebody know the reason why this is happening. I mean its the application problem i.e in code or the Xcode or iPhone Simulator App problem.
Any help would be really appreciated.
I faced the same problem last day. I got it working after I have done the following, not sure which step did the trick.
Reset the simulator contents.
Quit simulator
Delete derived data of the project from xcode.
Restart xcode.

run button in xcode 4

Whenever I re-run my application by selecting the run button in xcode for, it says simulator already in use. So I have to stop it every time before re-running.
So my question is, is there any option or setting to avoid this. I want to run the application without stopping it like we used to do in xcode 3.
The issue is that pressing the Home button, even in the simulator, does not stop your app under iOS 4. You can either stop your app in the debugger, or in the simulator, or you can modify your app such that it doesn't run in the background. See Opting Out of Background Execution.
In Application PLIST file, we have a flag of “Application does not run in background”.
If you set this flag to “YES” and press home button, application will not maintain its status or perform any background tasks.
This is a bug in Xcode 4 which occurs sometimes. Usually you can make it go away by quitting the Simulator and restarting Xcode. If that still doesn't fix the problem, I would report the issue at bugreport.apple.com and see if the engineers at Apple can help.

Difference between running Iphone app through Xcode and running it through the Iphone

I'm having some strange behaviour ocurring when I try to run my Iphone app without using Xcode. If I run it by choosing Build & Run in Xcode it runs just fine, but if I do it by disconnecting the USB cable and tapping on the app on the Iphone, it crashes, yielding an unhelpful crash log.
Is there any difference between these 2 scenarios that could be causing this behaviour?
The difference is that if you run it via Xcode, the debugger is attached and a lot of restrictions are not applied. For example, if an app starts up it must respond with a few seconds otherwise it's killed. If you run it with the debugger, that restriction is lifted. Same when exiting: if you hit the home button (on iOS < 4 or iOS >= 4 without multitasking) then an app gets five seconds to exit. Not so with the debugger attached.
It might help if you post the error message from the crash log.
After having run the app out of XCode, have you terminated it? With iOS 4 it will continue to run in the background, and when you tap on the app on the iPhone, it just brought to the foreground.
Double click on the home button and see if it's still running. If so, tap on the app until the minus sign appears and tap it.

iPhone simulator running invisible

iPhone simulator is running on my Mac but it's not showing the simulator. Two days back I had installed the Mac OS X 10.5.6 update. Xcode is launching the aplication in simulator, and it's running, as I can see the outputs on the gdb console window. But the simulator is not shown.
Try to remove ~/Library/Preferences/com.apple.iphonesimulator.plist
Had the same issue. The simulator was running somewhere way off screen. Could see it using expose, but couldn't move it.
Rather than using "Detect Displays", which didn't work for me, I changed the screen resolution and that popped it back into place.
Have you previously had an external monitor connected? Perhaps Mac OS X saved the simulator window off-screen the last time it was run?
In the System Preferences, select Displays and click the "Detect Displays" button while the simulator is running. That should force the simulator window to appear on-screen.
Nothing worked except the good old IT joke, Turn it off & on again! (Completely restarting the whole machine worked for me).