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.
Related
I tried to create two view controllers with a segue (just static pngs for now) just to test a build.
Either screen is all black or I get the standard Apple screen (just the regular icons), but don't see my build as a placeholder icon.
I already tried following these recommendations from the Apple Developer Forum and still see no solution. =/
Reinstall the Xcode beta
rm -rf ~/Library/Developer/Xcode/DerivedData
Open Xcode and delete all the simulators using the Window > Devices window
Take a backup of ~/Library/Developer/CoreSimulator/Devices/device_set.plist and then remove the com.apple.CoreSimulator.SimRuntime.iOS-9-0 key. Xcode doesn't seem to put this back so I don't know what else this might break.
Reinstall simulators within Xcode using the + in the lower-left of Window > Devices.
You should not be modifying ~/Library/Developer/CoreSimulator/Devices yourself. Chances are CoreSimulatorService was running at the time you did that, so you basically changed state out from underneath it. Where was that recommended to you? I'd like to comment in that thread so as to not let that information stand.
If you want to erase a device back to its default state, you can use xcrun simctl erase <UDID> or just choose the menu item in Simulator.
Now as to your initial problem, when you click on Build & Run, Xcode will install the application and then launch it for you. If you're not seeing it even install, then there's possibly something going wrong with install. I suggest you take a look at your device's system.log to see if installation was requested by CoreSimulatorBridge. If it was, then look for additional log lines that might indicate the failure reason. If it wasn't, then the issue is on the Xcode side.
Either way, you should file a radar at http://bugreport.apple.com including ~/Library/Logs/CoreSimulator/*.log ~/Library/Logs/CoreSimulator/[UDID]/system.log and a sysdiagnose taken when the issue is reproducing.
When I run my iOS application in the Simulator for the first time in Xcode 6.0.1, I got this error message:
Lost connection to "iPad 2".
Restore the connection to "iPad 2" and run "App Name” again, or if "App Name" is still > > running, you can attach to it by selecting Debug > Attach to Process > App Name.
Can any one suggest how I can solve this error message? After I stop running and rebuild, everything works fine.
Follow 2 steps :
1- sudo DevToolsSecurity -enable
2- Edit Scheme -> Run -> Debug excitable , uncheck this checkbox it will be ok !
You will now be able to run on simulator. This worked for me.
Same here. I thinks that is the bug of XCode.
Just stop running and Run Again. This way is working fine for me.
This is a known issue with iOS 8.0 and earlier, but changes in iOS 8.0 make the issue more likely to occur than in past versions.
In addition to the lost connection message, other appearances of this bug will be an ESRCH error message (POSIX domain, 3 code), an FBS* domain with code 4, or your app getting SIGKILL and dropped to debugger. I think there may be one more message for this bug, but those are the main 4 behaviors. Which one you gets depends on exactly what point in the launch you lost the race.
At present, the workaround is just to retry Build&Run or launch the installed app in the sim and attach to the running process with the debugger.
Reseting the simulator content and settings would solve the problem. From iOS Simulator drop down select Reset Content and Settings, after that build and run again. I hope that helps.
This happens less frequently in Xcode 6.2 as compared to Xcode 6 beta version.
Only solution is to Re-run your project. This seems to be bug.
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.
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.
As the title says, I'm having issues using LLDB. I've looked into this thread Xcode 4 hangs on attaching to (App name) when debugger is set to LLDB and followed the instructions given because I'm having exactly the same issue, and managed to debug by using GDB - it works flawlessly. Anyway, i'm working in a team and I'm the only one who's having this issue, so it's a bit annoying to switch back and forward from GDB to LLDB every time i commit changes so the workaround doesn't get synchronized in the remote repository.
I've checked the compiler, and it's set to LLVM 4.2. In fact, the app compiles perfectly and gets installed in the simulator (i can execute it once I kill and restart Xcode). I would try to reinstall Xcode, but it's a mess since it's a big-sized package and I have a limit on my internet usage, it would take a long while. Does anyone know what's happening here? Is it possible that LLGB is bundled outside XCode, even if I failed to locate it on the system?
Any insight would be appreciated. I can keep the workaround going, it's just that it's a bit annoying given my personal circumstances :-)
EDIT: More details about what I mean by 'hung'. I start with Xcode open, and simulator closed (it doesn't even appear on the Dock). I click 'Run', the simulator is launched successfully, and the application shows the Splash Screen. Then xcode shows the message: "Attaching to ". And now it's hung. You can close the simulator, and xcode is still attaching. Both the Run and Stop buttons stop working. You can try to exit the application by right-clicking on the dock, you get an alert message, and from this point you can't even type code: XCode is fully hung. The only choice here is to kill XCode by using Cmd+Alt+Esc.
This sounds like it could be the problem some folks were seeing in Why does the LLDB Debugger constantly fail to attach? where they'd modified their /etc/hosts file so when Xcode tried to connect to debugserver via "localhost", the connection was never set up.
When Xcode hangs, try switching to Simulator by clicking on its Dock icon. Don't use Cmd+Tab.
Upgrading to XCode 4.6.2 fixed this issue for me