Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/native-ui-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ jobs:
COVERED_ORIENTATION=NativeUIPluginTests/NativeUIPluginLifecycleTests/testOrientationPreservesCoveredControlsUntilRestore
CAPTURE_INTERACTION=NativeUIPluginTests/NativeUIPluginLifecycleTests/testSnapshotInteractionForwardsEnginePayloadToCapacitor
SOURCE_ORDER=NativeUIPluginTests/NativeUISnapshotTests/testViewCapturePreservesNativeSourceOrder
xcodebuild -scheme RdlaboCapacitorNativeUi-Package -destination "platform=iOS Simulator,id=$DEVICE" CODE_SIGNING_ALLOWED=NO -clonedSourcePackagesDirPath "$RUNNER_TEMP/native-ui-spm" -skip-testing:"$POPOVER_CLOSE" -skip-testing:"$POPOVER_REPLACE" -skip-testing:"$COVERED_ORIENTATION" -skip-testing:"$CAPTURE_INTERACTION" -skip-testing:"$SOURCE_ORDER" test
TOOLBAR_BADGE=NativeUIPluginTests/NativeUISnapshotTests/testSwiftUIToolbarBadgeUpdatesAndRemoval
xcodebuild -scheme RdlaboCapacitorNativeUi-Package -destination "platform=iOS Simulator,id=$DEVICE" CODE_SIGNING_ALLOWED=NO -clonedSourcePackagesDirPath "$RUNNER_TEMP/native-ui-spm" -skip-testing:"$POPOVER_CLOSE" -skip-testing:"$POPOVER_REPLACE" -skip-testing:"$COVERED_ORIENTATION" -skip-testing:"$CAPTURE_INTERACTION" -skip-testing:"$SOURCE_ORDER" -skip-testing:"$TOOLBAR_BADGE" test
cd ios/Tests
xcodebuild -project NativeUIHostedTests.xcodeproj -scheme NativeUIHostedTests -destination "platform=iOS Simulator,id=$DEVICE" CODE_SIGNING_ALLOWED=NO -clonedSourcePackagesDirPath "$RUNNER_TEMP/native-ui-spm" -only-testing:"$POPOVER_CLOSE" -only-testing:"$POPOVER_REPLACE" -only-testing:"$COVERED_ORIENTATION" -only-testing:"$CAPTURE_INTERACTION" -only-testing:"$SOURCE_ORDER" test
xcodebuild -project NativeUIHostedTests.xcodeproj -scheme NativeUIHostedTests -destination "platform=iOS Simulator,id=$DEVICE" CODE_SIGNING_ALLOWED=NO -clonedSourcePackagesDirPath "$RUNNER_TEMP/native-ui-spm" -only-testing:"$POPOVER_CLOSE" -only-testing:"$POPOVER_REPLACE" -only-testing:"$COVERED_ORIENTATION" -only-testing:"$CAPTURE_INTERACTION" -only-testing:"$SOURCE_ORDER" -only-testing:"$TOOLBAR_BADGE" test
android:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let package = Package(
.library(name: "RdlaboCapacitorNativeUi", targets: ["NativeUIPlugin"]),
.library(name: "NativeUICore", targets: ["NativeUICore"])
],
dependencies: [.package(url: "https://github.com/webview-native-ui/engine.git", exact: "1.0.9"), .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")],
dependencies: [.package(url: "https://github.com/webview-native-ui/engine.git", exact: "1.0.11"), .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")],
targets: [.target(
name: "NativeUICore",
dependencies: [.product(name: "WebViewNativeUIEngine", package: "engine")],
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
# Capacitor Native UI

Capacitor Native UI provides native controls, device colors and custom native content for WebView applications.
Render supported Web controls natively on iOS, use Android Dynamic Color, or add custom SwiftUI and Compose views to a Capacitor app.

For a complete Ionic app setup combining iOS Native UI and Android Dynamic Color, follow [WebView Native UI Standard setup](https://webview-native-ui.com/standard-setup).

## Individual guides

Choose the guide for the feature you need.

### 1. Use the plugin’s Native UI

The plugin renders supported Ionic and HTML controls natively on iOS. Your application keeps its state, routing and handlers.

| Your app | Guide |
| ------------------------------------ | --------------------------------------------------- |
| Ionic with the standard iOS 27 theme | [Ionic setup](docs/setup.md) |
| Ionic with an existing Web theme | [Existing-theme setup](docs/ionic-vertical-bars.md) |
| HTML without Ionic | [HTML setup](docs/framework-independent.md) |
| Your app | Guide |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| Ionic with the standard iOS 27 theme | [Ionic setup](https://webview-native-ui.com/projects/capacitor-native-ui/docs/setup) |
| Ionic with an existing Web theme | [Existing-theme setup](https://webview-native-ui.com/projects/capacitor-native-ui/docs/ionic-vertical-bars) |
| HTML without Ionic | [HTML setup](https://webview-native-ui.com/projects/capacitor-native-ui/docs/framework-independent) |

#### How projection works

Native UI presents the original Web control natively while retaining its state and handlers. See [supported controls and projection behavior](docs/native-ui.md).
Native UI presents the original Web control natively while retaining its state and handlers. See [supported controls and projection behavior](https://webview-native-ui.com/projects/capacitor-native-ui/docs/native-ui).

### 2. Use Dynamic Color

Read Android’s device palette and apply it through your theme. Use the [Dynamic Color guide](docs/dynamic-colors.md) for this feature on its own, appearance preferences and color mapping.
Read Android’s device palette and apply it through your theme. Use the [Dynamic Color guide](https://webview-native-ui.com/projects/capacitor-native-ui/docs/dynamic-colors) for this feature on its own, appearance preferences and color mapping.

### 3. Build your own Native UI

Render your own SwiftUI or Android Compose content through [app-local extensions](docs/native-ui-extensions.md). This feature is experimental.
Render your own SwiftUI or Android Compose content through [app-local extensions](https://webview-native-ui.com/projects/capacitor-native-ui/docs/native-ui-extensions). This feature is experimental.

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion RdlaboCapacitorNativeUi.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Pod::Spec.new do |s|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'packages/native-ui-core/ios/Sources/**/*.swift'
s.ios.deployment_target = '15.0'
s.dependency 'Capacitor'
s.dependency 'WebViewNativeUIEngine', '1.0.9'
s.dependency 'WebViewNativeUIEngine', '1.0.11'
s.swift_version = '5.9'
end
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ repositories {
}

dependencies {
implementation 'io.github.webview-native-ui:engine:1.0.9'
implementation 'io.github.webview-native-ui:engine:1.0.11'
api platform("androidx.compose:compose-bom:2025.10.00")
api "androidx.compose.ui:ui"
api "androidx.compose.foundation:foundation"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions docs/dynamic-colors.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
title: Android dynamic colors
title: Android Dynamic Color
---

# Android dynamic colors
# Android Dynamic Color

Dynamic colors are a supported, opt-in API. Read the device's Material You palette
<a id="android-dynamic-colors"></a>

Android Dynamic Color is an opt-in API. Read the device's Material You palette
without enabling Native UI projection, changing the Activity theme, or requesting
wallpaper/storage permissions. Ionic is not required to read colors. App-local
SwiftUI/Compose extensions remain experimental; their status is separate.
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The same appearance applies to existing `.button-submit` actions with solid fill

Native controls keep ownership during navigation, modal animations and image handoffs. An image shown in the WebView is still the native projection's presentation, not a return to the original Web button. Retest and remove transition-specific workarounds that force those controls back to Web. Keep intentional opt-outs and handling for unsupported controls or native failures; no additional animation flags or second runtime are needed.

Check both rail edges, rail disappearance, fold/rotation, card/sheet/full-screen presentation, and solid submit actions. Also check ordinary iPhone and browser fallback. For Cordova, use the [bundled integration](https://github.com/webview-native-ui/cordova-plugin); its pinned theme and native changes arrive through a Cordova plugin release rather than these Capacitor installation commands.
Check both rail edges, rail disappearance, fold/rotation, card/sheet/full-screen presentation, and solid submit buttons. Also check ordinary iPhone and browser fallback. For Cordova, use the [bundled integration](https://github.com/webview-native-ui/cordova-plugin); its pinned theme and native changes arrive through a Cordova plugin release rather than these Capacitor installation commands.

## Upgrading from 1.2.1

Expand Down
Loading
Loading