Xcode 9.1 cant start the Iphone simulator - ios

I just installed Xcode 9.1,before Xcode 9.1,when I click the "Play" button on top,the Iphone simulator start automatically.But after install Xcode 9.1,the iPhone simulator didnt start,no error,no phone appear on screen,only Xcode show build success.
Can somebody tell me how to solve this?So I can test the project on Iphone simulator.
Edit
After looking for a question in So,I able to start the simulator,by doing
Click on Target next to Play Button -> Edit Scheme -> Run -> Change
the Executable to "My Project"
The iphone simulator can start,but it give me this error
Any idea?

There seems to be a issue with iPhone simulator.You can see this issue in fastlane's git hub page as well. Happens more often when you are using command line tools.
Solution : Simply tap command + space opens hot search, type simulator and hit enter,
your simulator might not load and show an error thats fine. Now go to actions select simulator and say Reset Content and Settings.
Now go back to your Xcode and re run the code. Hope this resolves the issue

Related

Xcode10 cannot run the iOS12 simulator

Running the iOS12 Simulator on xcode10 failed. but other versions of the Simulator were normal.
It may needs to set you command line tool.
Reset your simulator and install command line tool for Xcode 10.
Reset Simulator:
See Here: Xcode - install Command Line Tools
Its happens some time so, You have to do "Erase Reset Content and Settings" of simulator by below step.
-> Click on simulator
-> Go on "Hardware" in menu bar
-> Select "Erase Reset Content and Settings..."
Give some time after done it. Close Xcode and reopen it.
This symptom usually appears in two cases:
when the system app (eg: SpringBoard) crashes while setting up the debugging session.
because of buggy 3rd party kexts interfering with the normal operation of the system.
If you are seeing any background crashes of the system app around the time of the failure, that's the likely cause. Otherwise, you should check the output of kextstat | grep -v com.apple, remove any listed 3rd party kexts, reboot, and try again.
The problem is solved by moving the xcode file location under the application file, then restarting the xcode and running it.

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.

Simulator fails to open

I always getting this error whenever i runs iOS 6 series simulators. I tried lot of steps for this problem. i.e., 1. deleting Derived Data, Creating a new project ..
Notification center label http://imageshack.com/a/img836/3808/adat.png
if anyone tell me the solution for this.
Please make sure that your application's plist settings are not changed .. if you try to do anything which in not approved by the iOS this messege is shown quite often . Then please reset the settings and contents of iOS Simulator. Hopefully it will work.
you have not provided more details i post answer in guessing from you question
refer below link it more helpful.
IOS simulator failed to install application? in Xcode 5
iOS Simulator failed to install the application
https://discussions.apple.com/message/24468440#24468440
Try to reset iOS 6.1 simulator from menu "iOS Simulator -> Reset Content and Settings...",
then run your app in XCode

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources