xcode 4.3.2 process hangs - xcode

I have run into a rather annoying bug in Xcode 4.3.2.
If you run a process from within Xcode, then stop the simulator directly (outside of Xcode), Xcode still shows the process as running and effectively disables any further interaction with the simulator.
I can't stop the process from within Xcode (no response), and I can't start a new process either as Xcode sees the simulator as being in use. Shutting down the simulator does not notify Xcode either, so I have no option but to shut down Xcode and open it up again But even that does't work as Xcode hangs whilst trying to shut down the process too! So I have to force quit Xcode!
Has anyone found a way round this? I realise I should now only operate the simulator from within Xcode, but I am used to being able to operate the simulator independently.
thanks

I was having similar issues with Xcode 4.3.2. I fixed them by doing the following:
Launch Xcode.
Close any open projects.
Open Organizer.
Delete project form left panel using the gear icon on the bottom left. Select "Remove from Organizer...". This clears all the data about your project that Xcode has cached (indexes, DerivedData, Snapshots, etc.).
5). Re-open project.
Since doing this, my Xcode hanging issues have disappeared.

Here are the steps I follow when this happens:
Start the simulator if it isn’t already running
Choose the option “Reset Content and Settings…” from the iOS Simulator menu
Clean and rebuild the project

Related

Xcode 14 stuck at Launching App on Simulator after few runs

I have update my xcode to 14.1 and macOS to Ventura 13.0.1.
When I run my app from xcode on a simulator iPhoneSE 3rd generation (iOS 16) it works fine a few times. After that xcode is unable to launch app on simulator.
The number of time I try to run it keep adding Launching [App Name] to process .
If I restart simulator it start working again but same thing happens after few runs.I also created new simulator and same thing happens to it as well.
Note: I'm facing same issue for different projects so I think it's not related to my project.
I was facing this issue on an M2 Macbook Air, every build would open the simulator the first time, but on a second run it would hang on a black screen during "Launching app." It turns out the "fix" was to disable "Open using Rosetta" (Applications > Xcode > Right click > Get Info) which I had turned on because of a third party dependency in a work project that didn't create a proper universal binary, which broke using the simulator on M1.
I think people updating to the new version are installing separately, which has the same effect of disabling the rosetta setting if they were using it already.

Simulator in use and even restarting XCode doesn't solve it

I sometimes get a dialog in Xcode which states "Simulator in use." Restarting Xcode didn't help.
I have no Simulator Icon in the Taskbar to quit it and I have no running Simulator.
Is there any solution without rebooting?
I know some of these points to not adress your specific issue since you wrote restarting Xcode would not help you but I'll try to provide a full list of possible fixes for people who might stumble upon this one day.
Is the "Stop" Button in the left corner of Xcode still clickable ? ==> Click It
Try to reset contents & settings of iOS Simulator
Clean Build & Clean Project
Quit iOS Simulator (look at the Activity Monitor if there is still something running)
Restart Xcode
Restart Mac
This is all I can think of. For me most of the times I can resolve it by just restarting Xcode. As you wrote this does not work for you so maybe some of the other points of my list will help you.
Normally this happens when you terminate the iOS Simulator but not the debug session itself, which is why most of the times the "Stop" button in the left corner is clickable most of the times...
This dialog (and the state that triggers it) comes entirely from Xcode and not the simulator itself. This dialog will present itself if Xcode is already using the simulator from another workspace. For example, if you have three projects open at the same time and you do a Build&Run (eg: click "play") in one of them, you will get this dialog if you do a Build&Run in one of the other projects.

Xcode 6 simulator not deleting sandbox

Without going on a bizarre snipe hunt into the bowels of ~/Library/Developer/CoreSimulator, I can't seem to remove an app completely from Xcode 6's simulator.
If I run the app the first time, all is good - The app believes it is the first time launched.
(no NSUserDefaults, etc)
If I then tap/hold to delete the app in the simulator, then re-run, all the data is there again-
Ergo it's NOT a clean install launch at this point.
Anyone figure out how to really remove the app from the simulator, as it is not removed as cleanly as it is on the device..
Unfortunately it seems like a bug in the latest simulator. Currently I've only been successful with the "Reset Content and Settings..." item from the "iOS Simulator" drop down menu.

iOS 8 today extension - recompile

I create an extension for my app in iOS 8 and it is displayed correctly under the Today tab.
However when I make a change to the extension (either a UI change in the Storyboard, a UI change in viewDidLoad code, or some changes in the widgetPerformUpdateWithCompletionHandler method), there's nothing that is changed when I recompile. The only way I can make the changes to appear is to delete the app from the device/simulator then compile/install again. Restarting XCode (I work with XCode 6 beta 4) / restarting the computer does not help.
How can I fix the bug?
How am I supposed to debug the extension, because setting breakpoints does not seem to do anything and no NSLog messages are printed to the console (I suppose, since it's a different target).
It's a known bug, read the release notes for iOS 8b5.
Debugging (and NSLog) works in Xcode but not always (known bugs). You can still attach the debugger if Xcode cannot attach himself (Debug -> Attach to process)
For me, the simulator works better than real device, so use the simulator until things got better.
2 tips:
Close the simulator at end of debugging (i have a script for auto closing the simulator when i press STOP in Xcode, tell me if you want it).
When you launch the plugin process in simulator, wait for "All applications" display list, if you click "Run" before the list are loaded, the debugger won't attach.

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

Resources