LogoLogo
  • AppFlowy
    • ⭐Start here
      • Welcome to AppFlowy Docs
      • How to get help
      • Install AppFlowy
    • 🛠️Installation
      • 🖥️System Requirements
      • 💿Installation methods
        • Mac / Windows / Linux Packages
          • Installing on Linux
            • Installing & Setting up Flutter on Linux from Source
        • Docker
    • 🌱Community
      • 🤙Get in contact
      • 📔AppFlowy Mentorship Program
        • Program Guidance
        • Proposal Template
        • Pull Request Template
        • Mentorship 2023
          • Mentee Projects
            • Calendar View for AppFlowy Database
            • Custom Themes
            • Shortcuts and Customized Hotkeys for AppFlowy
            • Table
            • ⭐Favorites
            • Code Block
            • Outlines
            • Importers
            • AI Writers
            • Templates
          • Project Ideas
      • ✍️Write for AppFlowy
        • 📃Drafts
          • [Draft] Use Case: Software Engineer
          • [Draft] Use Case: High School Students
          • [Draft] How to add a new property to appflowy database
      • 🍂Hacktoberfest
    • 🛣️Roadmap
    • 🌋Product
      • 💽Data Storage
      • 🎨Customize and Style Content
      • ⏮️Duplicate, Delete, and Restore
      • 💎Databases
        • 🔢Database Properties
        • 🗃️Manage Properties
      • Ⓜ️Markdown
      • ⌨️Shortcuts
      • 🪄AppFlowy AI
      • 🦙AppFlowy Local AI - Ollama
      • 🎨Themes
      • ☁️AppFlowy Cloud
      • 🧩AppFlowy Plugins
        • Table-view Databases
        • Kanban Board
        • Calendar
        • Auto Generator
        • Smart Edit
        • Code Blocks
        • Math Equations
        • Cover
        • Emoji
  • Documentation
    • 💎Software Contributions
      • 🟢Get started
      • 💀Architecture
        • Frontend
          • Tauri
            • 🗺️CodeMap
          • Web
            • 🌟Design Philosophy
          • Flutter
            • 🗺️Project Structure: CodeMap
            • 🧮Grid
            • ⚙️Setting
          • Inter-Process Communication
          • User
            • User Data
            • Events & Notifications
          • Folder
            • Events & Notifications
          • Document
          • Database View
            • Events & Notifications
            • Grid
            • Calendar
            • Kanban Board
        • Backend
          • Initialize
          • Events
          • Delta(WIP)
          • Profiling
          • Database
        • Domain Driven Design
        • Proposals
      • 🏗️Conventions
        • 🔤Naming Conventions
        • ⌨️Code Conventions
          • 🐦Flutter
        • 🐙Git Conventions
      • 💛Submitting Code
        • 🏦Setting Up Your Repositories
        • ⤴️Submitting your first Pull Request
      • 🤟Coding Standards and Practices
        • 👽Rust Backend
    • 🚀AppFlowy
      • 👾How to contribute to AppFlowy
      • 🏗️Building from Source
        • 🌳Flutter Setup
          • 🐧Building on Linux
          • 🍎Building on macOS
          • 🪟Building on Windows
        • 🌐Web Setup
        • 📡Tauri Setup
      • ☁️Debugging with AppFlowy Cloud
      • 🔁Debugging in VS Code
      • ☎️Translate AppFlowy
      • ❓Troubleshooting
      • 👮‍♀️Licenses
    • 🏍️AppFlowy Editor
      • ⌨️How to Implement Markdown Syntax To Style Text In AppFlowy Editor
      • 🧩How to Create a Plugin for AppFlowy Editor
      • 👮‍♀️Licenses
    • ☁️AppFlowy Cloud
      • 🌈Architecture
      • ☀️Deployment
  • Guides
    • Sync Desktop and Mobile
    • Self-Hosting AppFlowy
      • ☁️Self-hosting AppFlowy with AppFlowy Cloud
      • 🆓Self-hosting AppFlowy for free Using Supabase
    • Import From Notion
  • Blog Highlights
    • 🔮Demystifying AppFlowy Editor's Codebase
  • Handbook
    • Core values
Powered by GitBook
On this page
  • Step 1: Get the source code
  • Step 2: Install Flutter
  • Step 3: Install your build environment
  • Step 4: Edit and run the application
  • Building in release mode

Was this helpful?

Edit on GitHub
  1. Documentation
  2. AppFlowy
  3. Building from Source
  4. Flutter Setup

Building on macOS

PreviousBuilding on LinuxNextBuilding on Windows

Last updated 4 months ago

Was this helpful?

Note:

  • If you encounter any issues, have a look at first. If your issue is not included in the page, please create an or ask on .

Step 1: Get the source code

You should fork the code instead if you wish to submit code to AppFlowy. You'll find information on that in Setting Up Your Repositories

git clone https://github.com/AppFlowy-IO/AppFlowy.git

Step 2: Install Flutter

Skip this if flutter is already installed on your system.

  • Follow the instructions to install Flutter.

    • It will ask you to run flutter doctor to check any dependencies you need to install to complete the setup.

      • It is not necessary to install Android toolchain and Android studio to run AppFlowy.

      • However, CocoaPods and VS Code are required.

  • Make sure you also install the & extensions in VS Code.

Step 3: Install your build environment

  • Run the setup script from the base directory

    • It will guide you through to install Rust, which is required by AppFlowy

./frontend/scripts/install_dev_env/install_macos.sh
export PATH="$PATH":"$HOME/.pub-cache/bin"

Make sure to restart your terminal and VS Code

Step 4: Edit and run the application

  1. Open the frontend folder located at xx/AppFlowy/frontend with VS Code. It is important not to open the root folder, as that will not give access to the appropriate debug commands.

  2. Go to the Run and Debug tab and then click AF-desktop: Clean + Rebuild All for the first time running.

Building in release mode

  1. Go to the AppFlowy/frontend/ directory.

  2. Run the following command to build the binary depending on your architecture.

cargo make --profile production-mac-x86_64 appflowy
cargo make --profile production-mac-arm64 appflowy

The scripts are located in the AppFlowy/frontend/Makefile.toml file.

The resulting binary file is located in AppFlowy/frontend/appflowy_flutter/product/x.x.x/[OS]/Release/AppFlowy/.

FYI, AppFlowy uses to construct the build scripts. It is important that you add (dart) pub to $PATH, otherwise VS Code may error out. Add the following to your .bashrc or .zshrc in $HOME:

Open xx/AppFlowy/frontend/appflowy_flutter/lib/main.dart and then check the device selection:

If you encounter any issues, have a look at first. If your issue is not included in the page, please create an or ask on .

🚀
🏗️
🌳
🍎
Troubleshooting
issue
Discord
here
Flutter
Dart
https://github.com/sagiegurari/cargo-make
Troubleshooting
issue
Discord
img.png