是否可以在Linux虚拟机上使用Flutter开发iOS应用? [英] Is it possible to develop iOS apps with Flutter on a Linux virtual machine?

查看:360
本文介绍了是否可以在Linux虚拟机上使用Flutter开发iOS应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是开发移动应用程序的新手,想尝试Flutter,但我使用Windows.因为Flutter还不支持Windows,所以我想到了使用运行Linux的虚拟机来安装Flutter的想法.这行得通吗?

I am new to developing mobile apps and wanted to try Flutter but I use Windows. Because Flutter doesn't support Windows yet I had the idea to use a virtual machine running Linux to install Flutter. Does this work?

在Flutter设置中也这样说:

Also in the Flutter setup it says this:

要开发适用于iOS的Flutter应用,您需要一台具有Xcode 7.2或更高版本的Mac.

To develop Flutter apps for iOS, you need a Mac with Xcode 7.2 or newer.

是否可以在没有Mac的情况下开发iOS应用?

Is there a way to develop iOS apps without having a Mac?

推荐答案

是的,您可以使用Android Studio或Visual Studio Code在Linux(或Windows)上开发iOS应用. Flutter的要点是您只有一个代码库,并且可以部署到Android和iOS.因此,开发阶段没有问题.

Yes, you can develop iOS apps with Linux (or Windows) using Android Studio or Visual Studio Code. The point of Flutter is that you have one code base and can deploy to both Android and iOS. So the development phase is no problem.

过去,如果您拥有Mac,则只能将iOS应用部署到App Store,但现在有更多选择.请参阅以下文章:

In the past you could only deploy iOS apps to the App Store if you had a Mac, but there are some more options now. See the following articles:

  • How to sign Flutter apps for iOS automatically without a Mac
  • Developing and debugging Flutter apps for iOS without a Mac
  • How to develop and distribute iOS apps without Mac with Flutter & Codemagic

但是,要在iOS模拟器上测试您的应用,仍然需要有一台Mac.但是,从理论上讲,该应用程序在大多数情况下应具有与Android设备上相同的行为,因此您无需使用iOS模拟器对其进行测试.我会说,从长远来看,您可能想考虑购买Mac,但是一开始肯定没有必要.

To test your app on the iOS simulator, though, it is still necessary to have a Mac. However, theoretically the app should have the same behavior for most things as on an Android device, so you wouldn't necessary need to test it using the iOS simulator. I would say long term you would probably want to consider getting a Mac, but it is certainly not necessary in the beginning.

更新:在我最近制作的一个应用中,我的测试通过了Android模拟器,但在iOS模拟器中崩溃了.这是一个正常的错误,没有iOS特有的错误,但由于某种原因,Android模拟器并未崩溃.因此,对于生产应用程序,您确实需要在iOS设备/模拟器上对其进行测试.

Update: In a recent app I made, my tests passed in the Android emulator but crashed in the iOS simulator. It was a normal bug and nothing specific to iOS, but for some reason the Android simulator didn't crash. So for a production app, you really do need to test it on an iOS device/simulator.

这篇关于是否可以在Linux虚拟机上使用Flutter开发iOS应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆