Not able to launch app in iOS simulator in vscode - ios

I am new to vscode, I tried running my code in iOS simulator but its not showing the simulator in the first place.
the options i get are
view android emulators
view iOS simulators
But when I click on view iOS simulators I get a pop up saying
" Something went wrong fetching you iOS simulators! Make sure you have Xcode installed. Try running this command in your terminal: instruments -s devices "

You may need to run this command, when VSCode tries access the simulator there may be error which says
Cannot find "xcodebuild". Xcode 11.0.0 or greater is required to
develop for iOS. Encountered error while building for device.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Related

iOS Xcode: Failed to find a suitable device for the type IBSlimDeviceTypeiPdad2x error after updating to Xcode 10.2

I am developing React Native app using react-native-cli.
To run iOS app on device with iOS 12.2 installed i've recently updated my Xcode version to 10.2 and I am facing this error during the compilation:
Also, getting this error, trying to open simulator from Xcode - Open developer tool
What can be the problem?
Xcode 10.2 which contains iOS 12.2 and it's simulators
Please go to Xcode > Preferences > Locations
Select command line tools to latest Xcode.
Hope it will work.
Just run the following command to make sure all background process of the simulator that were run during the update are killed :
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

Flutter : Not Connecting to IOS Simulator in Android Studio

I am following the Flutter Test Drive tutorial on the Flutter Docs. I installed XCode, cocoapods, ran pods setup etc.
However, in Android Studio, when I try to run IOS by clicking "Run IOS Simulator," it opens the simulator but fails to connect.
I also tried doing this from the terminal. Opened an IOS emulator and then ran flutter run in the app folder in terminal. I got an error No devices attached.
Please check whether you installed the latest version of Xcode.
After the installation, try to run the following command.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
As other people have suggested, it happens when you update XCode. So, run the command in terminal suggested by Muhammed
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Then, you probably have to run
flutter clean.
For it to run properly.
I ran into the same problem but unfortunately, #MUHAMMED IQBAL PA's solution didn't suffice.
Running these two commands, however, resolved the problem:
As pointed out by others:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
:
sudo xcodebuild -runFirstLaunch
I fixed this problem by flowing these steps and refreshing the list of simulators
This error showed up after I updated my Xcode.
Open Terminal
Run the following command in Terminal
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Enter your device's password.
Your IDE (Android Studio or IntelliJ) will detect the IOS Simulator as soon as you click return.
it happened to me when i have updated my Xcode, use this command to let Flutter recognize your Xcode again.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
I have to use three steps:
running this two commands :
1)
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
2)
flutter clean
3)
I have to select on Android studio Ide - (on the simulator select button drop down left hand side of main.dart showing) I have to select "Open IOS emulator".
Then the simulator run. And the simulator was Auto select on the emulator selected section.
I have used Android Studio Bumble Bee and Xcode 13.
The summary is, I think, I have to open the simulator first, then its come to online with Android studio.
I came across this problem on my MacBook.
iOS toolchain - develop for iOS devices (Xcode 8.2.1)
✗ Flutter requires a minimum Xcode version of 9.0.0.
Download the latest version or update via the Mac App Store.
Xcode was not updated. That is why IOS simulators are not supported.
Also make sure that you have agreed to Xcode licenses via running the command,
sudo xcodebuild -license
I Fixed this issue like this:
Open simulator
Go to "Device" in menu
Click "Erase all content and settings"
which this will delete all content and settings of the simulator but the problem of hide in the android studio devices will be fix.
I had different issue why IOS simulator was not appearing in fresh installation - dart sdk was not configured. I've clicked run->run there it was showing that dart is not configured, I've added flutter/bin/cache/dart-sdk in config and after that iphone simulator has appeared. Of course I followed other steps:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch

React Native ios Simulator - Simulator is installed but is identified as '; don't know what that is

I'm trying to launch the ios simulator to try an React Native App. I did't hace XCode installed until now.
To install my simulator, I had installed XCode, and I started a project "Simulator", to push "next" I needed a company name, I put "simu", after that, I clicked on "Project > Run", and I could see my simulator run.
In my CLI, when I launch the command yarnpkg run ios, I get this error:
Simulator is installed but is identified as 'simu.Simulator'; don't know what that is.
23:55:17: Failed to start simulator:
Unable to verify Xcode and Simulator installation.
I removed all my simulators, but the name persists, I had search how to change the identificator, but I dont find results.
I would like to know if I can change the "simu.Simulator" to Simulator, someone can help me?
The issue you might be facing is there might not be command line tools selected in your xCode Preferences. In Preferences -> Location, Choose command line tool
By default, after installing Xcode command-line not selected, so open Xcode and go to Preferences >> Locations and set Command Line Tools...
This worked for me in MAC High Sierra, Xcode Version 9.3:
Press i to open iOS emulator...
And You can see a cool new iPhone simulator like below image:
For Expo 32, the other solutions didn't work for me.
This SO answer solved it for me: Just open the Simulator before invoking it from Expo.
This worked for me with IOS Ph 11 simulator and subsequently for all the other devices

Calabash can't connect to simulator

I'm trying to run some Calabash UI tests in my app but am running into trouble connecting to my simulator. I'm trying to just connect view the calabash-ios console, but am running into the following error:
WARNING
Warning Trying to connect to simulator that was not launched by Calabash/instruments.
To fix this you must let Calabash or instruments launch the app.
Query will work, but gestures will not.
I've run the app view my -cal target and have successfully seen the message Started LPHTTP server on port 37265. Here's some more info on Calabash/my setup:
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
xcodebuild -version
Xcode 7.0
Build version 7A218
calabash-ios version
0.14.3
server_version
=> {"app_id"=>"com.solstice.discoverfinancialenterprise.mobile", "outcome"=>"SUCCESS", "server_port"=>37265, "version"=>"0.14.3", "app_name"=>"Discover", "system"=>"x86_64", "simulator_device"=>"iPhone", "simulator"=>"", "app_version"=>"1", "short_version_string"=>"6.6.1 UAT", "iphone_app_emulated_on_ipad"=>false, "app_base_sdk"=>"iphonesimulator9.0", "form_factor"=>"iphone 4in", "git"=>{"revision"=>"c2d009b", "remote_origin"=>"git#github.com:calabash/calabash-ios-server.git", "branch"=>"master"}, "screen_dimensions"=>{"sample"=>1, "height"=>1136, "width"=>640, "scale"=>2}, "4inch"=>true, "iOS_version"=>"8.4"}
Sorry the JSON isn't formatted, my console spat it out in an unformatted way.
I've used a few different simulators, iPhone 6, iOS 9 and iOS 8.3, and an iPhone 5s iOS 8.4. Does anyone know anything I need to do differently to get this to connect to my simulator?
+100 for including all the information about your environment.
Please update to Calabash 0.16.4 which is compatible with your Xcode version.
I'm trying to just connect view the calabash-ios console, but am running into the following error:
Can you show how you launched console and what command you tried to run?
Typically, you want something like this:
$ APP=/path/to/Your.app calabash-ios console
> start_test_server_in_background
You must let calabash launch the app or you will not be able to perform gestures.
APP and APP_BUNDLE_PATH are synonymous.
http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-APP+and+APP_BUNDLE_PATH

No simulator folder in xcode 6

I am using OSX Yosemite. I have installed xcode 6.1.1 recently but i can't run my code in simulator.
When i press "run" button. It shows error statement which is
"Xcode cannot run using the selected device. No supported iOS devices are available. Connect an iOS device to run your application or choose an iOS simulator as the destination"
I have tried the possible solution. I enter "Devices" page(Windows -> Devices). There is no simulator in the page. Then i click "+" to create simulator. It shows error statement which is "unable to determine SimDeviceSet, set_path=/Users/User Name/Library/Developer/CoreSimulator/Devices
I can't find this location in my computer. Even i have uninstalled and reinstalled the xcode. The location and related simulator file still can't be found.
Do you guys have any ideas about it? Many thanks!!!!!!!!!!
I had the same issue today and re-setting the developer directory made it work again for me (restart Xcode afterwards).
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Resources