Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
bb34af0
feat: experimental iOS Rive backend with synchronous API
mfazekas Feb 9, 2026
3b3e558
chore: move docs to .local/docs, remove from git
mfazekas Feb 9, 2026
56dfbc2
refactor: remove ExperimentalFileSource from legacy backend
mfazekas Feb 9, 2026
7fd5473
fix: restore whitespace in legacy files, remove fragile asset type gu…
mfazekas Feb 9, 2026
85af2db
fix: share single Worker across all files, fix artboard property data…
mfazekas Feb 9, 2026
14e0615
fix: wire up trigger property to experimental fire/stream API
mfazekas Feb 9, 2026
dac6589
fix: set fit after view setup to fix .layout mode on initial render
mfazekas Feb 11, 2026
e1b6e21
test: add advanced data binding harness tests
mfazekas Feb 11, 2026
d9fa0ee
fix: guard negative index in legacy viewModelByIndex and createInstan…
mfazekas Feb 11, 2026
2bb40b6
fix: correct trigger property listener task type signature
mfazekas Feb 11, 2026
9032b01
fix: embed SPM RiveRuntime.framework via Podfile post_install hook
mfazekas Feb 11, 2026
5f05b1b
refactor: split Android into legacy/experimental backend directories
mfazekas Feb 12, 2026
5425329
feat: implement Android experimental backend using new app.rive.* API
mfazekas Feb 12, 2026
b2c4a11
feat: implement Android experimental backend with CommandQueue API
mfazekas Feb 16, 2026
67d2662
feat: migrate getEnums() from sync to async (Promise)
mfazekas Feb 17, 2026
004e195
fix: color property overflow and test tolerance for cross-platform di…
mfazekas Feb 17, 2026
10064aa
feat: add backend property to RiveFileFactory for runtime detection
mfazekas Feb 17, 2026
4452056
feat: migrate viewModelByIndex, createInstanceByIndex, viewModel to a…
mfazekas Feb 17, 2026
2af7dc1
fix: lint formatting in ViewModel spec and harness test
mfazekas Feb 17, 2026
60a054e
ci: add experimental runtime harness tests for iOS and Android
mfazekas Feb 18, 2026
a0937f5
ci: increase iOS experimental harness timeout to 90min for cold builds
mfazekas Feb 18, 2026
61729cc
fix: handle throwing Worker() init in rive-ios 6.15.1
mfazekas Feb 18, 2026
15ae1ad
fix: experimental iOS instance lookup and test guards
mfazekas Feb 19, 2026
f6fd208
feat: add async APIs for RiveFile/ViewModel and fix experimental inst…
mfazekas Feb 19, 2026
89301d5
chore: upgrade rive-ios SPM to 6.15.2
mfazekas Feb 19, 2026
b4e43e5
fix: only allow snakeLizard enum on android legacy backend
mfazekas Feb 19, 2026
28f1584
test: add useViewModelInstance e2e harness tests
mfazekas Feb 19, 2026
5fdf082
fix: implement color property get/listen and fix UInt32 crash on expe…
mfazekas Feb 26, 2026
a2f0723
feat(ios): decouple SPM from experimental runtime toggle
mfazekas Mar 11, 2026
54e8ef8
fix: unify USE_RIVE_NEW_API flag, replace SPM with CocoaPods, fix exp…
mfazekas Mar 12, 2026
418db86
fix: skip autoPlay test on both experimental backends
mfazekas Mar 12, 2026
b1ee80e
fix: remove unused Platform import
mfazekas Mar 12, 2026
7800951
chore: update nitrogen generated files
mfazekas Mar 16, 2026
c4bde18
fix: use ArrayBuffer instead of ArrayBufferHolder in new HybridRiveFi…
mfazekas Mar 16, 2026
c0f5083
feat: add async versions of viewModelCount, artboardCount, artboardNames
mfazekas Mar 16, 2026
ed2561a
feat: add async alternatives for ViewModel property value getters
mfazekas Mar 16, 2026
afe36ad
fix: add missing Promise import in experimental Android property file…
mfazekas Mar 16, 2026
ed8c055
ci: remove android style guide enforcement from ktlint
mfazekas Mar 17, 2026
f9c7ffe
fix(kotlin): fix all ktlint violations and add lint:fix:kotlin script
mfazekas Mar 17, 2026
70a40fc
ci: fail lint-kotlin job on ktlint errors
mfazekas Mar 17, 2026
53a164e
feat: add explicit type field to ResolvedReferencedAsset for asset lo…
mfazekas Mar 17, 2026
9048850
fix: format import in ReferencedAssets.ts to satisfy Prettier
mfazekas Mar 17, 2026
dc854d2
chore: re-run nitrogen to regenerate bridge code for RiveAssetType/ty…
mfazekas Mar 17, 2026
3c8c246
fix: disable function-naming ktlint rule for Composable PascalCase fu…
mfazekas Mar 17, 2026
05690e0
fix: apply ktlint auto-format to ComposeTestActivity
mfazekas Mar 17, 2026
0e84a06
fix(ios): update ExperimentalAssetLoader to use typed RiveAssetType enum
mfazekas Mar 17, 2026
6484abe
fix(android): update ExperimentalAssetLoader to use typed RiveAssetTy…
mfazekas Mar 17, 2026
e55aec9
refactor: API cleanup — validate option, createBlankInstanceAsync ren…
mfazekas Mar 17, 2026
8a814a1
fix(ios): correct set(value:) argument label to match generated protocol
mfazekas Mar 17, 2026
ad859b1
fix(ios): createInstanceByIndex(Async) now respects the index
mfazekas Mar 18, 2026
ab8489d
fix: remove createInstanceByIndexAsync, fix createInstanceByIndex on …
mfazekas Mar 18, 2026
80af621
fix(ios): implement propertyCount and instanceCount using runtime APIs
mfazekas Mar 18, 2026
8e5e724
test: strengthen replaceViewModel assertion to verify actual replacement
mfazekas Mar 18, 2026
1f7e7cf
fix(ios): don't set instanceName to property path for nested VMIs
mfazekas Mar 18, 2026
3538281
fix(android): remove VM name heuristic, throw on unsupported ops for …
mfazekas Mar 23, 2026
77466c3
fix: update Podfile.lock to RiveRuntime 6.17.0 from main
mfazekas Mar 23, 2026
46fc56a
chore: regenerate nitrogen bindings after rebase
mfazekas Mar 26, 2026
4279807
fix: remove duplicate async methods in legacy files, make HybridRiveV…
mfazekas Mar 26, 2026
94bc586
fix: add missing createInstanceAsync to experimental backends
mfazekas Mar 26, 2026
af9aa90
fix: remove redundant createInstanceAsync, keep only createBlankInsta…
mfazekas Mar 26, 2026
2109f62
fix: use yarn nitrogen (with postprocess), fix ktlint blank line
mfazekas Mar 26, 2026
3572a40
chore: add Issue189 reproducer and nodefaultbouncing.riv from fix/and…
mfazekas Mar 26, 2026
3307e43
fix(ios-exp): skip auto-binding when artboard has no default ViewModel
mfazekas Mar 26, 2026
9c00813
Fix "0x1 not found" error when artboard has no default ViewModel on A…
mfazekas Mar 26, 2026
2158102
fix: enable experimental API flag, await Worker init, update Podfile.…
mfazekas Mar 27, 2026
a95c049
fix: update test harnesses for useViewModelInstance {instance, error}…
mfazekas Mar 27, 2026
0f44f89
fix: ktlint spacing between declarations with comments
mfazekas Mar 27, 2026
623d089
test: skip Android experimental tests that need rive-android#443
mfazekas Mar 30, 2026
29f27d9
test: clarify skip reasons for Android experimental test guards
mfazekas Mar 30, 2026
4f84615
fix: clean up legacy files to match upstream, fix Issue159 error type
mfazekas Mar 30, 2026
1918b0e
fix: make legacy HybridViewModel identical to main
mfazekas Mar 31, 2026
dc95c4a
feat: make experimental runtime the default, legacy opt-in via USE_RI…
mfazekas Mar 31, 2026
a9850b5
refactor: rename android/src/experimental to android/src/new to match…
mfazekas Mar 31, 2026
0afea6e
fix: add missing getPropertyCountAsync/getInstanceCountAsync to new b…
mfazekas Mar 31, 2026
7633e10
chore: enable prerelease (beta) versioning for 0.5.0 release track
mfazekas Mar 31, 2026
237700c
fix(ios): add @MainActor to RiveReactNativeView, guard stale config t…
mfazekas Apr 8, 2026
b6bbb50
fix(ios): make awaitViewReady reentrant, support multiple callers
mfazekas Apr 8, 2026
5ebffbb
fix(android): use RuntimeException instead of Error for recoverable f…
mfazekas Apr 8, 2026
5656138
fix: log error instead of swallowing in createInstanceByName catch
mfazekas Apr 8, 2026
42d4540
fix(android): log warning when inferFromMagicBytes falls back to IMAG…
mfazekas Apr 8, 2026
e6ac484
fix(ios): add MainActor.assumeIsolated for calls into @MainActor Rive…
mfazekas Apr 8, 2026
067bbea
fix(ios): port Xcode 26 ODR workaround from main into podspec
mfazekas Apr 8, 2026
4b5e283
fix(ios): add missing try to MainActor.assumeIsolated in afterUpdate
mfazekas Apr 8, 2026
219c609
fix(ios): use onMainSync instead of MainActor.assumeIsolated for JS-c…
mfazekas Apr 8, 2026
0b2f05f
fix(ios): make onMainSync provide @MainActor isolation, fix infinite …
mfazekas Apr 9, 2026
13f079d
fix(ios): use Result to propagate errors from onMainSync across dispa…
mfazekas Apr 9, 2026
652c872
fix(android): use device density for Fit.Layout default scale factor …
mfazekas Apr 14, 2026
359c540
fix(android): use device density for Fit.Layout in experimental backe…
mfazekas Apr 14, 2026
fb86bf0
feat: add RiveLogger with configurable JS handler and deprecation war…
mfazekas Apr 24, 2026
24bf675
fix(ios): defer fit assignment until MTKView is ready in experimental…
mfazekas Apr 27, 2026
d545711
feat: add RiveLog.setLogLevel() to filter log output (#232)
mfazekas Apr 29, 2026
32f85f2
chore(ios): bump rive-ios to 6.19.1 (#233)
mfazekas Apr 29, 2026
018c63d
fix(ios): add backend property to legacy HybridRiveFileFactory (#236)
mfazekas Apr 29, 2026
dcfc431
fix(ios): prevent crash on color values with high alpha (#234)
mfazekas Apr 29, 2026
f9d75e4
fix(ios): pass fit in constructor, OOB asset improvements (#237)
mfazekas Apr 29, 2026
8a943df
feat: add async variants for ViewModelListProperty mutation methods
mfazekas Apr 30, 2026
4ba5dd6
fix: remove pinned rive-android version from example app
mfazekas Apr 30, 2026
cda21e6
chore: upgrade react-native-nitro-modules to 0.35.6
mfazekas Apr 30, 2026
6af4fdd
chore: remove ComposeTestActivity and LegacyTestActivity from example…
mfazekas Apr 30, 2026
e509ad3
chore(ios): bump rive-ios to 6.19.2
mfazekas Apr 30, 2026
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ktlint_standard_string-template-indent = disabled
ktlint_standard_backing-property-naming = disabled
ktlint_standard_no-consecutive-comments = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_condition-wrapping = disabled
ktlint_standard_if-else-wrapping = disabled
ktlint_standard_function-naming = disabled

[nitrogen/generated/**/*.kt]
ktlint = disabled
197 changes: 196 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
ktlint_version: "1.5.0"
android: true
fail_on_error: true

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -472,3 +472,198 @@ jobs:
run: |
echo "=== Checking logcat for errors ==="
adb logcat -d -s ReactNativeJS:* RiveExample:* RNRive:* | tail -200 || echo "No logs found"

test-harness-ios-legacy:
runs-on: macos-latest
timeout-minutes: 90
env:
XCODE_VERSION: 16.4
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Use appropriate Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}

- name: Restore cocoapods
id: cocoapods-cache
uses: actions/cache/restore@v4
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-legacy-cocoapods-${{ hashFiles('example/ios/Podfile', '*.podspec') }}
restore-keys: |
${{ runner.os }}-legacy-cocoapods-

- name: Install cocoapods
if: steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
cd example
bundle install
USE_RIVE_LEGACY=1 bundle exec pod install --project-directory=ios

- name: Save cocoapods cache
if: steps.cocoapods-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
**/ios/Pods
key: ${{ steps.cocoapods-cache.outputs.cache-key }}

- name: Restore iOS build cache
id: ios-build-cache
uses: actions/cache/restore@v4
with:
path: example/ios/build
key: ${{ runner.os }}-ios-legacy-build-${{ env.XCODE_VERSION }}-${{ hashFiles('yarn.lock', 'ios/**', 'nitrogen/generated/ios/**', '*.podspec', 'example/ios/Podfile', 'example/ios/RiveExample/**') }}
restore-keys: |
${{ runner.os }}-ios-legacy-build-${{ env.XCODE_VERSION }}-

- name: Build iOS app
if: steps.ios-build-cache.outputs.cache-hit != 'true'
working-directory: example/ios
run: |
set -o pipefail && xcodebuild \
-derivedDataPath build \
-workspace RiveExample.xcworkspace \
-scheme RiveExample \
-sdk iphonesimulator \
-configuration Debug \
build \
CODE_SIGNING_ALLOWED=NO

- name: Save iOS build cache
if: steps.ios-build-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: example/ios/build
key: ${{ steps.ios-build-cache.outputs.cache-primary-key }}

- name: Boot iOS Simulator
uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 16 Pro'
os_version: '18.6'

- name: Install app on simulator
run: xcrun simctl install booted example/ios/build/Build/Products/Debug-iphonesimulator/RiveExample.app

- name: Wait for simulator to be fully ready
run: |
echo "Waiting for simulator to be fully ready..."
sleep 10
xcrun simctl list devices | grep Booted

- name: Run harness tests on iOS
working-directory: example
run: |
for attempt in 1 2 3; do
echo "Attempt $attempt of 3"
if yarn test:harness:ios --verbose --testTimeout 120000; then
echo "Tests passed on attempt $attempt"
exit 0
fi
echo "Attempt $attempt failed, retrying..."
sleep 5
done
echo "All attempts failed"
exit 1

- name: Debug - Check for console logs
if: failure()
run: |
echo "=== Checking simulator logs for errors ==="
xcrun simctl spawn booted log show --predicate 'processImagePath CONTAINS "RiveExample"' --last 5m --style compact 2>&1 | tail -200 || echo "No logs found"

test-harness-android-legacy:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
ANDROID_API_LEVEL: 35
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Finalize Android SDK
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"

- name: Enable legacy Rive backend
run: |
echo "USE_RIVE_LEGACY=true" >> example/android/gradle.properties

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-harness-legacy-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-harness-legacy-
${{ runner.os }}-gradle-harness-
${{ runner.os }}-gradle-

- name: Restore Android build cache
id: android-build-cache
uses: actions/cache/restore@v4
with:
path: example/android/app/build
key: ${{ runner.os }}-android-legacy-build-${{ env.ANDROID_API_LEVEL }}-${{ hashFiles('yarn.lock', 'android/**', 'nitrogen/generated/android/**', 'example/android/app/build.gradle', 'example/android/gradle.properties') }}
restore-keys: |
${{ runner.os }}-android-legacy-build-${{ env.ANDROID_API_LEVEL }}-

- name: Build Android app
if: steps.android-build-cache.outputs.cache-hit != 'true'
working-directory: example/android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: |
./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=x86_64

- name: Save Android build cache
if: steps.android-build-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: example/android/app/build
key: ${{ steps.android-build-cache.outputs.cache-primary-key }}

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Run harness tests on Android
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_LEVEL }}
arch: x86_64
target: google_apis
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
disable-animations: true
script: |
adb install example/android/app/build/outputs/apk/debug/app-debug.apk
sleep 10
cd example && for attempt in 1 2 3; do echo "Attempt $attempt of 3"; if timeout 300 env ANDROID_AVD=test yarn test:harness:android --verbose --testTimeout 120000; then echo "Tests passed on attempt $attempt"; exit 0; fi; echo "Attempt $attempt failed (exit $?), retrying..."; sleep 5; done; echo "All attempts failed"; exit 1

- name: Debug - Check logcat
if: failure() || cancelled()
run: |
echo "=== Checking logcat for errors ==="
adb logcat -d -s ReactNativeJS:* RiveExample:* RNRive:* | tail -200 || echo "No logs found"
22 changes: 20 additions & 2 deletions RNRive.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ if !rive_ios_version
raise "Internal Error: Failed to determine Rive iOS SDK version. Please ensure package.json contains 'runtimeVersions.ios'"
end

Pod::UI.puts "@rive-app/react-native: Rive iOS SDK #{rive_ios_version}"
# The experimental runtime backend is used by default. Set USE_RIVE_LEGACY=1
# (or $UseRiveLegacy = true in Podfile) to fall back to the legacy backend.
use_legacy = ENV['USE_RIVE_LEGACY'] == '1' || (defined?($UseRiveLegacy) && $UseRiveLegacy)

if use_legacy
Pod::UI.puts "@rive-app/react-native: Using legacy Rive runtime backend (iOS SDK #{rive_ios_version})"
else
Pod::UI.puts "@rive-app/react-native: Using experimental Rive runtime backend"
end
Comment thread
mfazekas marked this conversation as resolved.

# Xcode 26 workaround: strip .Swift Clang submodule from RiveRuntime's prebuilt
# modulemaps to prevent ODR conflicts with locally-compiled Swift C++ interop.
Expand Down Expand Up @@ -65,11 +73,21 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

if use_legacy
s.exclude_files = ["ios/new/**"]
else
s.exclude_files = ["ios/legacy/**"]
end

s.public_header_files = ['ios/RCTSwiftLog.h']
load 'nitrogen/generated/ios/RNRive+autolinking.rb'
add_nitrogen_files(s)

s.dependency "RiveRuntime", rive_ios_version
s.dependency 'RiveRuntime', rive_ios_version

install_modules_dependencies(s)

unless use_legacy
s.xcconfig = { 'OTHER_SWIFT_FLAGS' => '$(inherited) -DRIVE_EXPERIMENTAL_API' }
end
end
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,17 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

def useLegacy = rootProject.findProperty('USE_RIVE_LEGACY') == 'true'

sourceSets {
main {
java.srcDirs += ["generated/java",
"generated/jni"]
if (useLegacy) {
java.srcDirs += ["src/legacy/java"]
} else {
java.srcDirs += ["src/new/java"]
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,23 @@ class HybridRiveFile : HybridRiveFileSpec() {
}
}

override fun getEnums(): Promise<Array<RiveEnumDefinition>> {
val file = riveFile ?: return Promise.resolved(emptyArray())
return Promise.async {
try {
file.enums
.map { enum ->
RiveEnumDefinition(
name = enum.name,
values = enum.values.toTypedArray()
)
}.toTypedArray()
} catch (e: NoSuchMethodError) {
throw UnsupportedOperationException("getEnums requires rive-android SDK with enums support")
}
}
}

override fun dispose() {
scope.cancel()
weakViews.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ data class FileAndCache(
@Keep
@DoNotStrip
class HybridRiveFileFactory : HybridRiveFileFactorySpec() {
override val backend: String = "legacy"

private fun buildRiveFile(
data: ByteArray,
referencedAssets: ReferencedAssetsType?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ class HybridViewModelListProperty(private val listProperty: ViewModelListPropert
return Promise.async { getInstanceAt(index) }
}

override fun addInstanceAsync(instance: HybridViewModelInstanceSpec): Promise<Unit> {
return Promise.async { addInstance(instance) }
}

override fun addInstanceAtAsync(instance: HybridViewModelInstanceSpec, index: Double): Promise<Unit> {
return Promise.async { addInstanceAt(instance, index) }
}

override fun removeInstanceAsync(instance: HybridViewModelInstanceSpec): Promise<Unit> {
return Promise.async { removeInstance(instance) }
}

override fun removeInstanceAtAsync(index: Double): Promise<Unit> {
return Promise.async { removeInstanceAt(index) }
}

override fun swapAsync(index1: Double, index2: Double): Promise<Unit> {
return Promise.async { swap(index1, index2) }
}

override fun addListener(onChanged: () -> Unit): () -> Unit {
val remover = addListenerInternal { _ -> onChanged() }
ensureValueListenerJob(listProperty.valueFlow.map { })
Expand Down
14 changes: 14 additions & 0 deletions android/src/main/java/com/margelo/nitro/rive/DeprecationWarning.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.margelo.nitro.rive

object DeprecationWarning {
private val warned = mutableSetOf<String>()

fun warn(method: String, replacement: String) {
if (warned.add(method)) {
RiveLog.w(
"Deprecation",
"'$method' is deprecated and blocks the calling thread. Use '$replacement' instead.",
)
}
}
}
22 changes: 22 additions & 0 deletions android/src/main/java/com/margelo/nitro/rive/HybridRiveLogger.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.margelo.nitro.rive

import androidx.annotation.Keep
import com.facebook.proguard.annotations.DoNotStrip

@Keep
@DoNotStrip
class HybridRiveLogger : HybridRiveLoggerSpec() {
override fun setHandler(handler: (level: String, tag: String, message: String) -> Unit) {
RiveLog.handler = handler
}

override fun resetHandler() {
RiveLog.handler = null
}

override fun setLogLevel(level: String) {
val parsed = RiveLogLevel.fromString(level)
?: throw RuntimeException("Invalid log level '$level'. Use: debug, info, warn, error")
RiveLog.minLevel = parsed
}
}
Loading
Loading