With the iOS simulator version 10, double clicking the home button to bring up multitasking (running apps) sometimes does not respond. Even hitting (cmd + shift + h)x2 to simulate home button double click also works sometimes. I have verified this with a work mate and they have the same issue. I am not sure if this is a bug in the simulator or if there is a setting somewhere on for example the delay between the clicks? The answer from here did not make a difference.
I have this problem too when I want to close my app. So, I use command line instead:
xcrun simctl list | grep Booted
then copy simulator ID, and run this command to close app
xcrun simctl terminate <simulator ID> <your app bundle ID>
... or if you have only one simulator running, just type booted:
xcrun simctl terminate booted <your app bundle ID>
Enable this setting in the simulator hardware settings.
Hardware > Keyboard > Send Keyboard Shortcuts to Device
Command + Shift + H + H will no longer do anything BUT double tapping the home button on the simulator will start working as expected.
Related
I'm trying to do Hot Reload when running flutter code from xcode but nothing I seem to do works.
I see a console within xcode. I can see my logs there but I don't see the normal "Flutter run commands" output. When I type "r" or "R" there it just writes "r" or "R" with no change to my running app.
I have tried running flutter run from the terminal and I also can't type "r" or "R" without it only typing that letter into the console.
I can do do hot reload via VSCode but I'm running into this issue (I can temporarily fix this issue but it comes up every other build).
I was able to debug my flutter code that was ran from xcode by attaching a flutter debugger.
I had to use VScode to attach the debugger. I installed the flutter extension. Second, I searched for the commend Flutter: Attach to Flutter on Device. Once you have that running, there are options to click to hot reload or hot restart.
The Xcode console doesn't work the way you're trying to do so.
Here are a few commands to Clean, Build and Run Xcode Project. Also there is no hot reload in Xcode. You can simply use these commands anywhere in Xcode except Console.
Shift + CMD + K to clean.
CMD + B to build.
CMD + R to run.
How can I fix this? I have 2.5 full pages of this:
Go into Window -> Devices. Then just select the Simulators you don't want and delete them (by hitting the Delete key, or right-clicking).
You can also un-select the "Show in Run Destinations Menu" item (when you right-click).
There was a bug in one of the earlier betas which could have caused extra devices to get created. The easiest thing to do is get back to a vanilla state. Quite Xcode.app, Simulator.app, etc and then run:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
rm -rf ~/Library/*/CoreSimulator
Xcode default shortcut for Comment Selection is cmd + / but it not working on my mac
first I try to set it from System Preferences > Keyboard > Shortcut > app shortcuts but it still not work.
then I try to Create other User to test it, when I use Other account to open Xcode and try that shortcut, it work!!
so I guest maybe the shortcut cmd + / is using by some app for global shortcut
restore System Preferences > Keyboard > Shortcut >> NOT WORKING
delete ~/Library/Preferences/om.apple.symbolichotkeys.plist >> NOT WORKING
Can anyone help me to find out what is going on?
OSX version is 10.11 and Xcode 7.3
For installing the .app file using Terminal I followed the steps provided here https://stackoverflow.com/a/27313079 .
It worked fine but when I try to launch, the application gets crashed. I followed few suggestions mentioned here Failed to Attach to Process ID Xcode but nothing worked for me so far. Your help is appreciated.
Well, head over to Terminal, (assuming you have Xcode command line tools installed)
But first, launch iPhone Simulator.
Then type xcrun simctl install booted /foo/bar.app into the Terminal,
Where /foo/bar.app is of course, your app.
Then wait a couple seconds.
After it completes, head over to the app's Info.plist file and find the line that says bundle identifier. Next to it is the bundle identifier, which should look like this: com.foo.bar or the like.
Then go to Terminal again and type xcrun simctl launch booted com.foo.bar, Where com.foo.bar is your app identifier.
I'm trying to terminate the iOS Simulator from the terminal console (needed for integrating automatic UI Testing in Jenkins),but every time I try the command:
killall SimulatorBridge
a prompt waiting for action gets displayed:
The problem is that the simulator doesn't get dismissed until an action on the prompt is taken. How to get rid of it?
The proper way to shutdown simulators is xcrun simctl shutdown all.
I don't recommend shutting down simulators by killing CoreSimulator.
Simulator.app is just a viewer (as of Xcode 9). It does not need to be launched and so does not need to be shut down either. It will respond to devices booting and shutting down automatically.
You can also hold down Option when quitting to detach from running simulators without shutting them down. Check the checkbox to make that the default behavior.
Similarly you can hold down Control when closing a window via File, Close to get a similar choice when closing a single simulator's window.
Use killall "iPhone Simulator"
With XCode 6, use killall "iOS Simulator" (thanks #gempewsaw)
With XCode 7, use killall "Simulator" (thanks #Stanislaw)
With XCode 8, killing the Simulator process is sometimes not enough, also need to kill process com.apple.CoreSimulator.CoreSimulatorService (thanks #bensnider)
I agree with the answers above. Just wanted to add that I noticed my Jenkins job was failing when there was no simulator to kill. I got around this by adding it like this:
killall "iOS Simulator" || echo "No matching processes belonging to you were found"
Good luck with your ci!
Please try
killall -9 "iPhone Simulator"
You can kill Simulator running from commandline.
killall "Simulator" || true