Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to develop iOS apps with Flutter on a Linux virtual machine?

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?

Also in the Flutter setup it says this:

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

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

like image 757
philipp Avatar asked Nov 12 '16 20:11

philipp


People also ask

Can we build iOS app on Linux?

Being an iOS developer, you know that using Xcode (IDE), you will be able to develop iOS mobile apps. However, Xcode only runs on a Mac computer. Thus, you need different ways to develop iOS applications on Linux. For developing an iOS app on Linux, you need virtualization software.

Can I build iOS apps on virtual machine?

As long as you don't have a Mac but still need to use macOS to write iOS apps, virtualization software is the simplest solution. Installed on your Windows PC, a virtual machine (VirtualBox, VMware, etc.) will provide you with the access to macOS, this way making it possible for you to develop iOS apps on Windows.

Can Flutter apps run on Linux?

Flutter provides support for compiling a native Windows, macOS, or Linux desktop app. Flutter's desktop support also extends to plugins—you can install existing plugins that support the Windows, macOS, or Linux platforms, or you can create your own.

Can you develop iOS apps with Flutter?

Flutter supports iOS 9.0 and later. If your app or plugins include Objective-C or Swift code that makes use of APIs newer than iOS 9, update this setting to the highest required version.


2 Answers

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.

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
  • Build an iOS app without a Mac or iPhone using Flutter

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.

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.

like image 153
Suragch Avatar answered Oct 01 '22 20:10

Suragch


As you point in your question:

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

You can work around by using an external service (like Travis-ci or other) to build your code for iOS. However it's not usable as a developer workflow as that can take several minutes to get the artefact.

like image 23
Alexandre Ardhuin Avatar answered Oct 01 '22 20:10

Alexandre Ardhuin