Simulator in use XCode 7 - ios

I have facing this issue frequently, and would like to fix permanently. There are a few known solutions I have like reset the simulator or quitting. But is there a proper fix?

You can run only one application on simulator at one time, So you can used below steps for resolve your problem as:-
A. Quit all other application and run simulator.
Or
B. Quit simulator and re-start application.
Or
C. Reset simulator or derived data based on your requirement.

Simple SoLution My friend
First of all quit your simulator.
And then quit and restart Xcode.
And then run your project.
it will work like Smoothly. try once.. its working 100 %
Then after it does't Work then
Try doing a reset content and settings
Another Way,
If you have two projects open in Xcode and one is running on the simulator, you can't run the other. Go through each project window and see if any are running, and if they are, press the "Stop" button on the top left
Another Way
multiple-projects-using-the-simulator then Here is the p[erfect answer, you can use ot. might be helpful to you.

Related

Xcode, iOS, "Stop "(null)", "An instance of "(null)" is already running..."

Xcode 7.2.1, iOS 9.2.1, ARC enabled
Sometimes when I am quickly building and running a project in Xcode back to back I get this error:
Xcode still thinks that it is still running an instance of my application on the device, however, the application has long since been terminated.
When I click "Stop" it just hangs up and looks like this...
I have tried waiting for 5 minutes, but the error does not clear and the status does not update to indicate that the application stopped running.
The only solution is to restart Xcode. This ends up being a huge hassle, because I have to navigate back to where I was and open all the necessary windows again.
Does anyone have an alternative way of handling this error?
It seems to occur when I intermix using the stop button with using the short cut to run the project (⌘ + R).
Much thanks in advance.
UPDATE 2/23/2016
I noticed that when I unplug and plug the cable back in after the error occurs the project allows a new build and instance to run, but the old instance never goes away, so you end up with multiple "running" projects.
Does anyone know how to get rid of that? Or add to the original solution?
1st Solution :
Technique 1- Clean your project , and then build.
Technique 2- Quit your Xcode, Clear your derived Data , plug In you
Data Cable Again , Then Run your Project.
2nd Solution (Happened For me too) :
Change Your Data Cable.

App do not run on second Simulator?

I am trying to run a app on multiple simulators. I did manage to run 2 simulators see link Xcode6: Run two instances of the simulator.
I can run other apps on the two simulators. I did manage to run this app on the two simulators in the past.
For some reason when I try to run a second simulator there is a pause I can see IOS system log trying to open the it just closes.
I searched the IOS Log file found that both simulators have the same data (unhelpfull). I would appreciate it if someone can just point me in a direction where to start searching for the problem?
My Mac memory is fine do not have to few. The start file is also not have anything I can see that might cause this problem.
Thanks in advance.
My problem was localisation that is why the add did not run on default english setting. The add worked correctly throw Xcode because the Sceme helped set the language.

FBSOpenApplicationErrorDomain code =4 error

When I'm trying to run iOS application in Xcode 6 in iPhone 6 simulator, I'm getting error Unable to run app in Simulator.
And error code is:
An error was encountered while running (Domain =
FBSOpenApplicationErrorDomain, Code = 4)
Can any one suggest how to resolve it?
This worked for me:
iOS Simulator -> Reset Contents and Settings... -> Reset
referenced from Qiita: Unable to run app in Simulator エラーの対応方法.
Just closing the iOS Simulator worked for me.
There is not always the need to reset the iOS Simulator. I did not even had to close Xcode.
This happened to me once when I added some assets as symbolic links (through ln -sf). Even installing to devices was failing.
After I removed the links and made a hard copy, it worked and error was gone.
No need to quit the simulator or reset all content every time .
Just close the app on which you are working if running on background .
it works for me .
As mentioned in the Xcode release notes, this error (along with a couple others) results from a timing bug. The workaround is to just retry.
See https://developer.apple.com/library/prerelease/mac/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html#//apple_ref/doc/uid/TP40001051-CH4-SW1
Testing on iOS simulator may produce an error indicating that the application could not be installed or launched.
Re-run testing or start another integration.
Also see:
https://devforums.apple.com/thread/248879?tstart=0
I just quit the simulator , cleaned up the project and ran again it worked.
Just quit the xcode6.0 beta or else and run project again, it worked for me.
Reseting the Xcode will delete some bad junk which simulator has cached, so reseting is good option to resolve this issue.
iOS Simulator -> Reset Contents and Settings.
Be careful if you skip installs.
I accidentally changed Skip Install on the main target, when i meant to change it on a dependency .
When changing it back I had to do a clean.
This problem probably started after we enabled background mode in our app.My solution :
1) Go to simulator
2) Hold cmd + shift
3) Tap 'H' key two times
4) Slide the application off to stop it running in the background.
5) Run again.
(Very tiring to have to repeat the above step each time I build and run)
Open your app scheme setting and edit it as shown in attached screenshot,
Actually you have to disable the "Launch Due to background fetch". Worked for me.
Steps,
1. Select your target and select "edit scheme"
2. Select "Options" tab on right side of detail window
3. Uncheck "Launch Due to background fetch" checkbox.
Disconnect hardware keyboard.
In ios simulator main menu
Hardware -> Keyboard -> Disconnect Hardware keyboard.

xCode 6 (beta 4) keep getting "The Simulator can't be launched because it is already in use."

I keep getting the "The Simulator can't be launched because it is already in use." when trying to run my app, this only happens about 20% of the time but once so far the only way to get around it is to restart my Mac.
Tried the following but doesn't help:
Cleaning my build folder
Closing and re-opening xCode
Force close of simulator
I'm Using xCode 6 (beta 4)
Any Ideas for a solution that doesn't entail me restarting my Mac?
Thanks
"The Simulator can't be launched because it is already in use.”
This messege will be shown only if there is another xcode project that has launched simulator and hasnt stopped it yet, and u try to run the simulator from another xcode project.
Ideally stopping the simulator from the respective project(PS. not closing the application from the simulator, clicking the STOP button) would do it,
But if it still is working like that, then Closing the simulator, or resetting the simulator contents.
If that still dsnt work, then as a last resort i would ask u to reinstall Xcode, as if this problem keeps going on, then ur downloaded file might be buggy.
P.S if u opt to re-download n install xcode please keep backup.
Hope it solves it. Although i want your problem to be solved by step 2.
This normally just happens when running an app (project) on the simulator and then trying to run another app while the simulator is open (and normally is still within the first app you launched and it can't quit automatically). As long as you keep running the same app you shouldn't get this error and as soon as you run another app just make sure you've closed the simulator before or at least left the previous app with the home button.
Just Restart Your Mac , It Will Fixed
I had the same problem and fixed it without restarting. You just need to reset the content on ios simulator, exit xcode, and then to make sure that you've completely exited, right clicking on the xcode icon on your mac nav bar and click Quit. Open it back up and it should work.

Xcode blocked at “Attaching to (app name)” when I launch my app in the simulator

I know there's a lot of posts with the same that problem. I just spent at least 2 hours to read them and I tried everything I saw in the responses but it still doesn't work. I don't know what to do anymore. Can someone help me?
I use Xcode 4.2.1
This problem occurs regularly for me, and the solution was always to kill the process named SimulatorBridge.
And to simplify the solution you can add a custom 'behavior' in Xcode to do the task by following these steps:
Make a shell script file with this command:
#!/bin/sh
killall SimulatorBridge
Save it in ~/Library/Developer/Xcode/UserData/Behaviors/ as KillSimulatorBridge.sh.
Open Xcode > Preferences > Behaviors, and add a new behavior to run the shell script:
Now, you can run this behavior whenever Xcode hangs while trying to attach to your app, and you can even have a keyboard shortcut to run it.
Hope this helps someone.
It can also happen when a different user account has the simulator running on the same computer. In that case, close the simulator on the other user's account and try again.
Restart your computer.
The simulator sometimes gets stuck and this is the only way I know to reset it. The same thing can happen to the device as well and you just have to switch it off and on again.
If that doesn't work, you may have to reinstall the SDK.

Resources