Giter Site home page Giter Site logo

xamarin.swiftui's Introduction

Xamarin.SwiftUI

A managed binding to SwiftUI.

Build Status

.github/workflows/build.yml

Project Status:

โœ… Active.

Xamarin.SwiftUI provides a managed binding to Apple's next-generation SwiftUI toolkit. Using your favourite .NET language, you should be able to create SwiftUI apps. However, only a handful of APIs are currently bound. Work is ongoing on a binding generator to automatically cover the entire API surface.

Example

A simple custom view with state:

using SwiftUI;
using static SwiftUI.Views;

public partial record ClickView : View
{
	readonly State<int> clicks = new State<int> (0);
	public View Body
		=> Button ($"Clicked {clicks.Value} times", () => clicks.Value++);
}

Building from Source

Prerequisites

  • .NET 6 SDK
  • Xcode 13 or newer

Building

dotnet msbuild /restore build.proj

If you need to make changes to the SwiftUIGlue native glue library during development, you can rebuild just those bits by running:

dotnet msbuild build.proj /t:SwiftUIGlue

Packaging

The major and minor version of nuget packages created by the CI pipeline is controlled by the VERSION file. This does not need to be bumped for patch releases.

For local development, the version of the package produced can be overridden:

dotnet msbuild /restore build.proj /t:Pack /p:Version=X.X.XXX

For more information about the internals and guidance on developing the binding itself, see the document titled Hacking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.