While it is easier to create apps using Uno Platform on Windows, you can also create all but UWP/WinUI apps on your Mac.
- Visual Studio for Mac 8.8
- Xcode 10.0 or higher
- An Apple ID
- .NET Core SDK
- .NET Core 3.1 SDK (version 3.1.8 (SDK 3.1.402) or later)
- .NET Core 5.0 SDK (version 5.0 (SDK 5.0.100) or later)
- GTK+3 for running the Skia/GTK projects
In order to create a new Uno Project, you'll need to install the dotnet new
Uno Platform templates.
-
To create a new project, from the command line:
cd src dotnet new unoapp -o MyApp01
-
Once created, open the
MyApp-vsmac.slnf
file
To update, go to Visual Studio > Preferences > Projects > SDK Locations > Apple
and select Xcode 12 or higher.
Restart Visual Studio.
- You can now run on iOS, Android, macOS and Skia.GTK projects by changing your startup project and start the debugger.
Note: You will not be able to build the UWP and WPF projects on a Mac. All changes to this project must be made on Windows.
You can create a new Uno Platfom solution with the following terminal command:
bash dotnet new unoapp -o MyProject --wasm=false
Once created, you can open it using the Visual Studio IDE.
Building for WebAssembly takes a few more steps:
- Set
MyProject.Wasm
to startup project - Build the project
- In the terminal, navigate to your build output path. This will typically be:
MyProject.Wasm > bin > Debug > net5.0 > dist
- Install
dotnet serve
:dotnet tool install -g dotnet-serve
- Once installed type
dotnet serve
. - Navigate to the url presented by the tool to run your application
If you have issues with Visual Studio and Uno Platform, please visit our Discord - #uno-platform channel or StackOverflow where our engineering team and community will be able to help you.