OpenSwiftUI README

The project's README from github.com/OpenSwiftUIProject/OpenSwiftUI. As one markdown file: README.md.

OpenSwiftUI

OpenSwiftUI

codecov

OpenSwiftUI is an open source implementation of Apple's SwiftUI

The project is for the following purposes:

And the API design and documentation is to stay as compatible with the original SwiftUI API as possible.

[!TIP] "Why join the navy if you can be a pirate?" — Steve Jobs

:)

Currently, this project is in early development.

The full API documentation is available on the OpenSwiftUI documentation site.

Notes

this project is for learning and research purposes only.

If you choose to use this project, you do so at your own risk and are responsible for compliance with any applicable laws.

The author of this project is not responsible for any consequences that may arise from your use of this project.

[!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

Integration Guide

To integrate OpenSwiftUI into your own Xcode project, see INTEGRATION.md for detailed step-by-step instructions.

Example Application

See Example folder and try it with ExampleApp

[!IMPORTANT] Clone OpenAttributeGraph in the same directory before running the example.

See Example/README.md for more detail.

Build

The current suggested toolchain to build the project is Swift 6.3.3 / Xcode 26.6.

Build without testing framework

./Scripts/build

Build with Library Evolution

./Scripts/openswiftui_swiftinterface

[!NOTE] This project's configuration is heavily based on many environment variables.

You can use the following tools on macOS platform to manage the environment variable more easily.

  • EnvPane: A macOS preference pane for environment variables
  • MenuHelper: A Finder Extension App to improve your efficiency.
  • launchctl via Scripts/sync_launchagent.sh

Supported platforms

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

Darwin Platform Status

Test Type CI Status
SwiftUI Compatibility Compatibility tests
UI Tests UI Tests

Platform Support

Platform CI Status Support Status Build Test Deploy Owner
macOS macOS ⭐️⭐️⭐️ *[^1] ✅ ✅ ✅ @Kyle-Ye, @Mx-Iris
iOS iOS ⭐️⭐️⭐️⭐️ *[^2] ✅ ✅ ✅[^5] @Kyle-Ye
Ubuntu 22.04 Ubuntu ⭐️⭐️ *[^3] ✅ ✅ ✅[^3] @Kyle-Ye
visionOS None ⭐️ *[^4] ✅ Not tested in CI ✅[^4] @Kyle-Ye
Android None Not supported yet ❌ ❌ ❌
Windows None Not supported yet ❌ ❌ ❌
Embedded None Preview[^6] ✅ ✅ ✅ @Kyle-Ye

[^1]: AppKit integration is partially implemented.

[^2]: UIKit integration is partially implemented.

[^3]: Build, test, and deployment with the stdout renderer are supported. Linux UI framework integration is not available yet.

[^4]: visionOS Simulator support is experimental and has no CI coverage. Physical device support has not been verified.

[^5]: iOS Simulator is supported. iOS device builds require the Compute backend. Apple's AttributeGraph backend is limited to the simulator because required device symbols are missing.

[^6]: Build and host tests are supported on the embed/folotoy branch. For the ESP32-C3 deployment example, see OpenSwiftUI on ESP32-C3.

[!NOTE] The cross-platform OpenAttributeGraph is not fully implemented.

The Linux stdout example uses the Compute backend to run its view graph.

[!NOTE] To request platform ownership, please first contribute to the target platform and then contact the project owner.

Current supported feature

Architecture

OpenSwiftUI Architecture

Products

Versioned documentation

The documentation site is built with VersionedDocC and automatically tracks main and recent release series. It provides version switching, build dates, and API change comparisons.

Build and preview the site locally with:

Scripts/preview-documentation.sh

See Docs/Documentation.md for configuration, caching, and release details.

Contributing

Contributions are welcome. See CONTRIBUTING.md for development setup, testing guidance, and pull request expectations.

Disclaimer

SwiftUI is a trademark of Apple Inc. This project is not affiliated with, endorsed by, or connected to Apple Inc. in any way. OpenSwiftUI is an independent open-source implementation created for educational and research purposes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

For third-party licenses and acknowledgements, see CREDITS.md.

Star History

Star History Chart

OpenSwiftUI (OpenSwiftUIProject/OpenSwiftUI)

Searching Database…

What is this?An open source implementation of Apple's SwiftUI. Goals: build GUI apps on non-Apple platforms like Linux and Windows, and diagnose and debug SwiftUI issues on Apple platforms, staying as API-compatible with SwiftUI as possible.
Is it a tool I run, or a framework I build my app with?A framework, not an app: a Swift package you integrate into your own Xcode project. The repo also ships OpenSwiftUIExtension (extra API collections) and OpenSwiftUIBridge for migrating other DSL frameworks over incrementally.
How do I try it out?Add it to your Xcode project following the step-by-step INTEGRATION.md guide, then run the ExampleApp in the Example folder — cloning OpenAttributeGraph into the same directory first or the example won't run.
What do I need installed to build it?The suggested toolchain is Swift 6.3.3 with Xcode 26.6. On macOS the build configuration also relies heavily on environment variables, which the README suggests managing with tools like EnvPane or a bundled launchctl script.
Could I ship a production app built on it?No — it is in early development and uses hidden APIs and private frameworks on Apple platforms, so it may break your build or crash on any future SDK/OS update. It is meant for learning and research only, at your own risk.
Which platforms can it actually build and run on today?iOS is best supported, then macOS. Ubuntu 22.04 works only with a stdout renderer so far — no Linux UI framework integration yet; visionOS is experimental, Windows and Android are not supported yet, and embedded is a preview.
Is it safe license-wise, given it re-implements an Apple framework?It is MIT licensed. The project stresses it is an independent implementation, not affiliated with or endorsed by Apple, and SwiftUI remains Apple's trademark — you use it at your own risk.
What can it actually render today?Color, Image and Path rendering, a layout system, an animation system, onAppear/onDisappear modifiers and basic geometry effects. Text is basic so far: output works in the macOS stdout renderer, while non-Darwin text layout is not supported yet.
How compatible is it with my existing SwiftUI code?The stated goal is to stay as compatible with the original SwiftUI API as possible, and OpenSwiftUI itself is described as a SwiftUI source compatibility framework. Since the project is in early development, expect partial coverage rather than a drop-in replacement.
Does it run on a physical iPhone or only in the simulator?Only the simulator out of the box: Apple's AttributeGraph backend is limited to the simulator because required device symbols are missing, so building for a real iOS device requires the Compute backend instead.
Why does the example need OpenAttributeGraph cloned next to it?OpenAttributeGraph is the companion project providing the cross-platform AttributeGraph view-graph backend, and it is not fully implemented yet — the Linux stdout example runs on the Compute backend. It must sit in the same directory as OpenSwiftUI when you run the example.
Size
12.1 MB
Stars
2.5K
Age
3y
Commits · 90 Days