Skip to content
/ NXKit Public

Apple's UIKit reimplementation on C++ in HorizonOS (Nintendo Switch) style

Notifications You must be signed in to change notification settings

XITRIX/NXKit

Repository files navigation

Warning

Deeply WIP project!

Main goal is to create a UI framework that tries to mimic Apple's UIKit as much as possible, so any iOS developer will be able to start using it without learning things from scratch and be as much portable as possible supporting various of platforms.

Current state:

  • Skia powered renderer
  • Platforms supported:
    • iOS
    • macOS
    • Nintendo Switch (LibNX)
  • Core implementation:
    • CALayer (rendering hierarchy)
    • Yoga flex auto layout
    • Animation system
    • Responder chain (touch propagation)
    • Focus system (basic gamepad input support)
    • UITraitCollection (dark mode)
image

TODO:

  • UIViewController presentation
  • Interface Builder
  • A lot of things tbh ...

Build

First Skia need to be compiled:

Switch:

bin/gn gen out/horizon --args='is_official_build=false skia_use_gl=true is_trivial_abi=true target_cpu="arm64" target_os="horizon" is_debug=false'
ninja -C out/horizon skia skparagraph

iOS:

bin/gn gen out/ios-arm64-angle --args='is_official_build=false target_cpu="arm64" skia_use_gl=true skia_use_metal=true is_trivial_abi=true skia_use_angle=true target_os="ios"'
ninja -C out/ios-arm64-angle skia skparagraph

To build project:

Switch:

cmake -B build/switch -DPLATFORM_SWITCH=ON
make -C build/switch ThorVGApp.nro -j$(nproc)
nxlink build/switch/ThorVGApp.nro

iOS:

cmake -B build/ios -GXcode -DPLATFORM_IOS=ON
open xCode project

About

Apple's UIKit reimplementation on C++ in HorizonOS (Nintendo Switch) style

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published