48

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?

philipp
  • 479
  • 1
  • 7
  • 11
  • 1
    Most probably it is not possible. Just like with any other cross-platform framework - phonegap/facebook-react etc. ASFAIK you can develop apps and test it on Android phones but to compile an iPhone version you need a macOS machine. There is no remote-compile/cloud-compile solution at the moment for Flutter. – kosiara - Bartosz Kosarzycki Nov 13 '16 at 23:22
  • After rereading the question and the answer i noticed that i may have misunderstood your question. Flutter Apps can be developed on Linux and Mac (see [faq](https://flutter.io/faq/#what-operating-systems-can-i-use-to-build-a-flutter-app) and [setup requirements](https://flutter.io/setup/#system-requirements)). I thought that you develop in dart and flutter takes care or the operating system of the the target mobile device. Why would you need ios other for testing? – surfmuggle Jan 18 '17 at 18:07
  • @surfmuggle I don't think it is even possible to compile code for ios on Linux. Of course I could write code and test it with Android but I have no way of testing it on ios (as you mentioned) and no way to even create the app for ios. – philipp Jan 19 '17 at 16:17
  • 1
    Adding to this question, is it possible to develop the app on linux and having an macos as a "compilation server"? I don't like using macos at all but I want to create mobile apps for android and ios using flutter. – nicowernli May 11 '18 at 09:00

5 Answers5

65

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:

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.

Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
  • 14
    In other words, *no*, you can't do it without a Mac, but there are services that let you use somebody *else's* Mac. – Mud Aug 07 '19 at 16:02
  • 3
    @Mud, you can *develop* a Flutter app without a Mac, but you can't *deploy* to iOS without one. – Suragch Aug 07 '19 at 16:38
  • Right, the pronoun "it" in my sentence was referring to "build/deploy". – Mud Aug 07 '19 at 19:05
  • @Suragch https://blog.codemagic.io/how-to-develop-and-distribute-ios-apps-without-mac-with-flutter-codemagic/ this link says otherwise. – BEvo Apr 12 '20 at 22:28
  • @BlitzMee, Thanks for the link. I added it to the answer. Which aspect of my answer does the article disagree with? Can you test the app on a virtual simulator now? – Suragch Apr 13 '20 at 00:53
  • @Suragch That im unsure of. The link has information about how to deploy, (publish to apple store) an ios app without having IOS. I founded it contrary to your comment above. – BEvo Apr 13 '20 at 09:55
  • 3
    @Mud, you are right. You either have to install a VM with Mac on your Windows or Linux (Hackintosh), but this is not so simple. Or you can use external service that let you use a MacOS machine some are free like Appollo (https://github.com/Appollo-CLI/Appollo) some aren't. – Maxime Deuse Sep 01 '22 at 07:43
  • External build services are at high risk unless you decode the build artifact and check it for malware / virus / backdoor etc. How do you know that you can trust that they don't manipulate YOUR code, beside the build? As MacOS seems to be mandatory for the build (local or remote), need to setup a VM for MacOS, if you want to keep development under Linux/Windows. @Mud: 1st answer was pretty on-point "somebody else's Mac". – Mick Belker - Pseudonym Jan 06 '23 at 14:46
10

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.

Alexandre Ardhuin
  • 71,959
  • 15
  • 151
  • 132
2

You should check out MacOS cloud solutions like MacInCloud. There are CI/CD solution that will support it (e.g. CircleCI and BitRise) however these are not suited for development.

Services like MacInCloud allow you to remote desktop into a Mac where you could conceivably use XCode remotely.

Aeyrium
  • 261
  • 2
  • 4
0

Windows is now partially supported in the way you can edit and publish for Android but you still can't create for IOS where a mac is required (XCode). More informations https://flutter.io/setup-windows

Robert Felker
  • 890
  • 1
  • 9
  • 18
  • But not to develop iOS apps. The app you develop in Flutter on Windows might work on iOS, but you can't run it as iOS app on Windows (using for example an emulator) or deploy it to the Apple app store, at least as far as I know. – Günter Zöchbauer May 15 '17 at 05:45
  • You're right ! which means that there's now a place for a startup that will build your Flutter app on remote server and then publish to market place à la Cordova. – Robert Felker May 15 '17 at 09:45
  • 2
    There are a few tools that can do just that today. Like Appollo for example : https://github.com/Appollo-CLI/Appollo – Maxime Deuse Sep 01 '22 at 07:46
0

You can use tools like Appollo to do just that directly from Windows or Linux. Appollo is a python CLI tool.

To install Appollo run pip install appollo, then setup your developer account with Appollo (https://appollo.readthedocs.io/en/master/tutorial/2_configure_app_store_connect.html) once this is done you can start building your app with appollo build start

You can check out a few example videos here : https://www.youtube.com/channel/UCBNRrJd4UP0QQRoYF4JOEmA

JulienP95
  • 147
  • 10
  • 12
  • Sounds nice, but at the end of the day, it's connecting to Apollo Remote for the build, which is MacOS on an unknown server apollo.deuse.dev. As I don't have any control what's happening on that server, I strongly recommend NOT to use it. The build server could inject malicious code into your application, e.g. with a backdoor or virus. Nobody wants to take such a huge risk. – Mick Belker - Pseudonym Jan 06 '23 at 14:38
  • Hello Mick, thanks for the comment. Of course, you are looking at our private dev environment. This is not where the VMs are located for our user. We use MacOS from MacStadium, located in Dublin, Ireland and in Atlanta, USA. I invite you to check Appollo again, we just made a new release today! https://github.com/Appollo-CLI/Appollo – JulienP95 Mar 21 '23 at 13:19