For the strongest security and latest features, find out whether you can upgrade to macOS Catalina, the latest version of the Mac operating system. If you still need macOS Mojave, use this App Store link: Get macOS Mojave.
- Requirements
- Create a new project
- Create and run
- Distribution
- macOS-specific support
- Entitlements and the App Sandbox
- Plugin support
By default macOS allows you to open apps from the official App Store only. If you have this still set as your default you will be seeing the warning when you try to open an app for the first time. Test Your App on macOS. Xcode supports debugging, testing, and profiling your iOS app natively on Apple silicon. When you open your iOS project in Xcode 12 or later, you have the option to build your app and run it directly on macOS. This option doesn’t run your app in a Simulator; it runs it as an iOS App for Mac.
Desktop support allows you to compile Flutter source codeto a native Windows, macOS, or Linux desktop app. Flutter’s desktopsupport also extends to plugins—you can install existing plugins that support the macOS or Linux platforms,or you can create your own.
Warning:Alpha! This page covers desktop support, which is available as alpha-quality features in the Flutter dev channel. Support still has notable feature gaps, including accessibility support.
Note: To compile a desktop app, you must build the app on the targeted platform: build a Windows app on Windows, a macOS app on macOS, and a Linux app on Linux. If you experience a problem that hasn’t yet been reported, please file an issue and include “desktop:macos/linux/windows” (whichever platform is appropriate) in the title.
Requirements
To create a Flutter app with desktop support, you need thefollowing software:
- Flutter SDK. See theFlutter SDK installation instructions.
- Optional: An IDE that supports Flutter.You can install Android Studio, IntelliJ IDEA,or Visual Studio Code andinstall the Flutter and Dart pluginsto enable language support and tools for refactoring,running, debugging, and reloading your desktop appwithin an editor. See setting up an editorfor more details.
Additional Windows requirements
For Windows desktop development,you need the following in addition to the Flutter SDK: https://visualever938.weebly.com/how-to-build-ios-app-without-mac.html.
- Visual Studio 2019 (not to be confused with Visual Studio Code)with the “Desktop development with C++” workload installed,including all of its default components
Additional macOS requirements
For macOS desktop development,you need the following in addition to the Flutter SDK:
- CocoaPods if you use plugins
Additional Linux requirements
For Linux desktop development,you need the following in addition to the Flutter SDK:
- libblkid
The easiest way to install the Flutter SDK along with thesedependencies is by using snapd.For more information, see Installing snapd.
Once you have
snapd
, you can install Flutter using the Snap Store,or at the command line:If
snapd
is unavailable on the Linux distro you’re using,you might use the following command:Create a new project
You can use the following stepsto create a new project with desktop support.
Set up
At the command line, perform the following commands tomake sure that you have the latest desktop support and thatit’s enabled. If you see “flutter: command not found”,then make sure that you have installed theFlutter SDK and that it’s in your path.
Where <platform> is
windows
, macos
, or linux
:To ensure that desktop is installed,list the devices available.You should see something like the following(you’ll see Windows, macOS, or Linux,depending on which platforms you’ve enabled):
You might also run
flutter doctor
to see if there areany unresolved issues. It should look something likethe following on Windows:On macOS, you might see something like the following:
On Linux, you might see something like the following:
If
flutter doctor
finds problems for a platform you don’tsupport, you can ignore those warnings. You don’t haveto install Android Studio and the Android SDK,for example, if you’re writing a Linux desktop app.After enabling desktop support, restart your IDE.You should now see windows (desktop), macOS (desktop), or linux (desktop) in the device pulldown.
Note: You only need to execute
flutter config --enable-<platform>-desktop
once. You can always check the status of your configuration using the no-argument flutter config
command.Create and run
Creating a new project with desktop support is no differentthan creating a new Flutter project for other platforms.
Once you’ve configured your environment for desktopsupport, you can create and run a desktop app eitherin the IDE or from the command line.
IDE
After you’ve configured your environment to supportdesktop, make sure you restart the IDE if it wasalready running.
Create a new app in your IDE and it automaticallycreates iOS, Android, and desktop versions of your app.(And web, too, if you’ve enabled web support.)From the device pulldown, select windows (desktop),macOS (desktop), or linux (desktop)and run your app to see it launch on the desktop. Best flyer design app on mac.
Command line
To create a new app that includes desktop support(in addition to mobile support), run the following commands,substituting
myapp
with the name of your project:To launch your app from the command line,enter one of the following commands from the topof the package:
Note: If there aren’t any other connected devices, the
-d <platform>
tag is optional.Build a release app
To generate a release build run one of the following commands:
Distribution
In general, we don’t recommend releasing a desktop app untildesktop support is stable.There are not yet full instructions, or tooling support,for making distributable applications. However,here is some information about how to use the currentbuild output on other machines for testing purposes.
Windows
The executable can be found in your project under
buildwindowsrunner<build mode>
.In addition to that executable, you need the following:- From the same directory:
- all the
.dll
files - the
data
directory
- all the
- The Visual C++ redistributables.You can use any of the methods shown in thedeployment example walkthroughs on the Microsoft site.If you use the
application-local
option, you need to copy:msvcp140.dll
vcruntime140.dll
vcruntime140_1.dll
Place the DLL files in a directory next to the executableand the other DLLs, and bundle them together in a zip file.
macOS
The
.app
is self-contained, and can be distributed as-is.Linux
For information on publishing a Linux app to theSnap Store, seeBuild and release a Linux desktop app.
As the tooling solidifies, stay tuned for updates on other waysto distribute a Linux desktop app.
Add desktop support to an existing app
To add desktop support to an existing project,run the following command in a terminal from theroot project directory:
This adds the necessary files and directories to yourFlutter project.
macOS-specific support
The following information applies only to macOS development.
Entitlements and the App Sandbox
macOS builds are configured by default to be signed,and sandboxed with App Sandbox.This means that if you want to confer specificcapabilities or services on your macOS app,such as the following:
- Accessing the internet
- Capturing movies and images from the built-in camera
- Accessing files
Then you must set up specific entitlements in Xcode.The following section tells you how to do this.
Setting up entitlements
Managing sandbox settings is done in the
macos/Runner/*.entitlements
files. When editingthese files, you shouldn’t remove the originalRunner-DebugProfile.entitlements
exceptions(that support incoming network connections and JIT),as they’re necessary for the debug
and profile
modes to function correctly.How to remove apps from start up mac mojave mac. If you’re used to managing entitlement files throughthe Xcode capabilities UI, be aware that the capabilitieseditor updates only one of the two files or,in some cases, it creates a whole new entitlementsfile and switches the project to use it for all configurations.Either scenario causes issues. We recommend that youedit the files directly. Unless you have a very specificreason, you should always make identical changes to both files.
If you keep the App Sandbox enabled (which is required if youplan to distribute your app in the App Store), you need to manageentitlements for your application when you add certain pluginsor other native functionality. For instance, using the
file_chooser
plugin requires adding either thecom.apple.security.files.user-selected.read-only
orcom.apple.security.files.user-selected.read-write
entitlement.Another common entitlement is com.apple.security.network.client
,which you must add if you make any network requests.Without the
com.apple.security.network.client
entitlement,for example, network requests will fail with a message such as:Important: The
com.apple.security.network.server
entitlement, which allows incoming network connections, is enabled by default only for debug
and profile
builds to enable communications between Flutter tools and a running app. If you need to allow incoming network requests in your application, you must add the com.apple.security.network.server
entitlement to Runner-Release.entitlements
as well, otherwise your app will work correctly for debug or profile testing, but will fail with release builds.For more information on these topics,see App Sandbox and Entitlementson the Apple Developer site.
Hardened runtime
If you choose to distribute your application outsideof the App Store, you need to notarize your applicationfor compatibility with macOS 10.15+.This requires enabling the Hardened Runtime option.Once you have enabled it, you need a valid signingcertificate in order to build.
By default, the entitlements file allows JIT for debug builds but,as with App Sandbox, you may need to manage other entitlements.If you have both App Sandbox and Hardened Runtime enabled,you may need to add multiple entitlements for the same resource.For instance, microphone access would require both
com.apple.security.device.audio-input
(for Hardened Runtime)and com.apple.security.device.microphone
(for App Sandbox).For more information on this topic,see Hardened Runtime on the Apple Developer site.
Plugin support
Flutter on the desktop supports using and creating plugins.
Using a plugin
To use a plugin that supports desktop,follow the steps for plugins in using packages.Flutter automatically adds the necessary native codeto your project, as with iOS or Android.
We recommend the following plugins, which have beenupdated to work for desktop apps:
Use the following links to find all packages on pub.devthat support desktop apps. These links lists all packages,not just plugin packages. (Remember that plugin packages,or plugins, provide an interface to platform-specific services.)
Writing a plugin
When you start building your own plugins,you’ll want to keep federation in mind.Federation is the ability to define several different packages,each targeted at a different set of platforms,brought together into a single plugin for ease of use by developers.For example, the Windows implementation of the
url_launcher
is reallyurl_launcher_windows
, but a Flutter developer can simply add theurl_launcher
package to their pubspec.yaml
as a dependency and thebuild process pulls in the correct implementation based on the target platform.Federation is handy because different teams with different expertisecan build plugin implementations for different platforms.You can add a new platform implementation to anyendorsed federated plugin on pub.dev, so long as you coordinatethis effort with the original plugin author.For more information, including information about endorsed plugins,see the following resources:
- Developing packages and plugins, particularly theFederated plugins section.
- How to write a Flutter web plugin, part 2,covers the structure of federated plugins andcontains information applicable to desktopplugins.
- Modern Flutter Plugin Development coversrecent enhancements to Flutter’s plugin support.
Samples and codelabs
- Write a Flutter desktop application
- A codelab that walks you through buildinga desktop app that integrates the GitHubGraphQL API with your Flutter app.
You can run the following samples as desktop apps,as well as download and inspect the source code tolearn more about Flutter desktop support.
- Flutter Gallery running web app, repo
- A samples project hosted on GitHub to help developersevaluate and use Flutter. The Gallery consists of acollection of Material design widgets, behaviors,and vignettes implemented with Flutter.You can clone the project and run Gallery as a desktop appby following the instructions provided in the README.
- Photo Search app
- A sample app built as a desktop application thatuses the following desktop-supported plugins:
To get the latest features and maintain the security, stability, compatibility, and performance of your Mac, it's important to keep your software up to date. Apple recommends that you always use the latest macOS that is compatible with your Mac.
Learn how to upgrade to macOS Big Sur, the latest version of macOS.
Check compatibility
If a macOS installer can't be used on your Mac, the installer will let you know. For example, it might say that your Mac doesn't have enough free storage space for the installation, or that the installer is too old to be opened on this version of macOS.
If you want to check compatibility before downloading the installer, learn about the minimum requirements for macOS Catalina, Mojave, High Sierra, Sierra, El Capitan, or Yosemite. You can also check compatible operating systems on the product-ID page for MacBook Pro, MacBook Air, MacBook, iMac, Mac mini, or Mac Pro.
Make a backup
Before installing, it’s a good idea to back up your Mac. Time Machine makes it simple, and other backup methods are also available. Learn how to back up your Mac.
Download macOS
It takes time to download and install macOS, so make sure that you're plugged into AC power and have a reliable internet connection.
Google App Store
These installers from the App Store open automatically after you download them:
- macOS Catalina 10.15 can upgrade Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks
- macOS Mojave 10.14 can upgrade High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion
- macOS High Sierra 10.13 can upgrade Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion
Your web browser downloads the following older installers as a disk image named InstallOS.dmg or InstallMacOSX.dmg. Open the disk image, then open the .pkg installer inside the disk image. It installs an app named Install [Version Name]. Open that app from your Applications folder to begin installing the operating system.
- macOS Sierra 10.12 can upgrade El Capitan, Yosemite, Mavericks, Mountain Lion, or Lion
- OS X El Capitan 10.11 can upgrade Yosemite, Mavericks, Mountain Lion, Lion, or Snow Leopard
- OS X Yosemite 10.10can upgrade Mavericks, Mountain Lion, Lion, or Snow Leopard
Install macOS
Follow the onscreen instructions in the installer. It might be easiest to begin installation in the evening so that it can complete overnight, if needed.
If the installer asks for permission to install a helper tool, enter the administrator name and password that you use to log in to your Mac, then click Add Helper.
Macos App Store Debug Chrome
Please allow installation to complete without putting your Mac to sleep or closing its lid. Your Mac might restart, show a progress bar, or show a blank screen several times as it installs both macOS and related updates to your Mac firmware.
App Store For Pc
Learn more
Macos App Store Debug Software
You might also be able to use use macOS Recovery to reinstall the macOS you're using now, upgrade to the latest compatible macOS, or install the macOS that came with your Mac.