/OpenSwiftUI

[WIP] Open source implementation of Apple's SwiftUI.

Primary LanguageSwiftMIT LicenseMIT

OpenSwiftUI

codecov

OpenSwiftUI is an open source implementation of Apple's SwiftUI

The project is for the following purposes:

  • Build GUI app on non-Apple platform (eg. Linux & Windows)
  • Diagnose and debug SwiftUI issues on Apple platform

And the API design is to stay the same as the original SwiftUI API as possible.

Currently, this project is in early development.

You can find the API documentation here.

Warning

This package use a lot of hidden API and private framework on Apple platform.

Please DO NOT use this package in Apple's production environment(eg. App Store).

Otherwize it may break your build or crash your app at any future SDK/OS update.

Usage

See Example folder and try it with ExampleApp

Important

Clone OpenGraph in the same directory before running the example.

See Example/README.md for more detail.

Build

Build without testing framework

./Scripts/build

Build with Library Evolution

./Scripts/openswiftui_swiftinterface

Note

You can use tools like EnvPane or MenuHelper on macOS platform to manage the environment variable more easily.

Supported platforms

The table below describes the current level of support that OpenSwiftUI has for various platforms:

Platform CI Status Support Status Build Test Deploy
SwiftUI Compatibility Compatibility tests
macOS macOS ⭐️⭐️⭐️ *1
iOS iOS ⭐️⭐️⭐️⭐️ *2
Ubuntu 22.04 Ubuntu ⭐️⭐️ *3
Wasm Ubuntu ⭐️ *4
Windows None Not supported yet

Note

The cross-platform OpenGraph is not fully implemented.

It is only API compatible with AttributeGraph now.

So most of the core feature is only available on Apple platform built with AttributeGraph varient.

Products

  • OpenSwiftUI
    • A SwiftUI source compatibility framework.
  • OpenSwiftUIExtension
    • Extensive API collections for OpenSwiftUI & SwiftUI.
  • OpenSwiftUIBridge
    • A bridge layer for migrating other DSL framework to OpenSwiftUI incrementally and mixing them freely.

License

See LICENSE file - MIT

Related Projects

Star History

Star History Chart

Footnotes

  1. AppKit and other UI framework backend is not intergrated yet.

  2. UIKit intergration is partly implemented. No Render support yet.

  3. Build and test is supported. But some feature is cut due to known Swift compiler issue.

  4. Build is supported. Test is not supported yet dut to upstream issue.