Can I run iOS emulator on Windows using Android studio Avd manger?
Asked Answered
D

7

35

I am writing a simple Flutter app on Windows using Android Studio. I am able to test my app on Android emulators well but I can't seem to figure how to add an iOS emulator to AVD manager nor connect to my Mac Pro and deploy to iPhone/iPad. Is that even possible? I do have a Mac Pro with Xcode installed and connected to an iPad.

Discredit answered 14/6, 2018 at 19:3 Comment(2)
You need an OSX machine for that.Riboflavin
Apple doesn't make dev tools for windows. And even if they did, it wouldn't run from the Android device managerAnlage
N
6

In order to test your flutter app in iOS Simulator,you have to do the following installation procedures into your MacBook:

  1. Install Android Studio/Visual Studio Code and all the Flutter/Dart Plugins/Extensions.
  2. Make Sure that your XCode version is >= 9.2
  3. Install Flutter Bundle for Mac
  4. After Running the Flutter doctor in the terminal and make sure all the important dependencies are installed.
  5. Import the Flutter Project from the Windows to the Mac and Open it in the Android Studio/Visual Studio or Copy Paste the Code from the Windows to the Mac main.dart file
  6. Open iOS Simulator and test the flutter app from the Android Studio/Visual Studio device selection
Nickels answered 14/6, 2018 at 20:48 Comment(0)
J
29

No, it is not possible. Any iOS operations require Xcode.

So either use an OSX virtual machine or use a mac. But from Windows, you won't be able to run an iOS emulator.

Joella answered 14/6, 2018 at 19:42 Comment(2)
What about connecting an iOS device (Like an iphone) by usb? Will that work or will I also need a MAC (Asking this because I do not own any apple-stuff - but I do not want to get a macbook only for flutter development. Might be able to get my hands on an iphone). I've also read about Xamarin. Is that a possibility maybe?Numbers
Same doubt I have . Is there any possibility to connect iPhone via USB and test the app in Android Studion windowsSaxophone
T
14

Unfortunately it's impossible :(

Flutter app can run on Android and IOS emulators with Android Studio, but ONLY on Apple machines (not Windows). So if you have Android Studio installed on Windows machine you won't have IOS emulator.

This info isn't obvious in Android Studio documentation, but you can find more details in Flutter installation guide:

So in your case the best way is to develop flutter apps on your Mac.

Tananarive answered 9/7, 2019 at 13:32 Comment(0)
N
6

In order to test your flutter app in iOS Simulator,you have to do the following installation procedures into your MacBook:

  1. Install Android Studio/Visual Studio Code and all the Flutter/Dart Plugins/Extensions.
  2. Make Sure that your XCode version is >= 9.2
  3. Install Flutter Bundle for Mac
  4. After Running the Flutter doctor in the terminal and make sure all the important dependencies are installed.
  5. Import the Flutter Project from the Windows to the Mac and Open it in the Android Studio/Visual Studio or Copy Paste the Code from the Windows to the Mac main.dart file
  6. Open iOS Simulator and test the flutter app from the Android Studio/Visual Studio device selection
Nickels answered 14/6, 2018 at 20:48 Comment(0)
K
5

Use VirtualBox to install MacOS, and then use the virtual MacOS to create an IOS emulator from XCode.

Kadner answered 11/10, 2020 at 19:43 Comment(0)
P
3

You cannot create an iOS emulator.. However, after running your app on Android simulator you can go to:

  1. Flutter inspector
  2. Platform and then select iOS or Android to override target platform which will toggle rendering and gesture behaviors between Android and iOS.
Pornocracy answered 5/4, 2020 at 15:10 Comment(2)
I cannot see platform in Flutter InspectorGudren
This feature is present in android studio. I am not sure about other ide's.Pornocracy
M
0

You can use the 'device preview' package from pub.dev.
device_preview : https://pub.dev/packages/device_preview

Just follow the easy documentation and you will be able to preview your app in different devices like iphone or anything.

Note: It's just a preview screen not an emualtor.

Masterstroke answered 30/10, 2023 at 21:41 Comment(0)
A
-6

Just run your code in chrome, open dock side seperated, toggle device size and pick iphone version

Aguish answered 10/3, 2022 at 5:19 Comment(1)
this answer leans to talking of web development. I believe the question relates to app development, so needs the iOS Simulator, not a web browserThracophrygian

© 2022 - 2024 — McMap. All rights reserved.