-
Notifications
You must be signed in to change notification settings - Fork 9
feat!: experimental Rive runtime backend (iOS + Android) #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mfazekas
wants to merge
100
commits into
main
Choose a base branch
from
feat/rive-ios-experimental
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 3b3e558
chore: move docs to .local/docs, remove from git
mfazekas 56dfbc2
refactor: remove ExperimentalFileSource from legacy backend
mfazekas 7fd5473
fix: restore whitespace in legacy files, remove fragile asset type gu…
mfazekas 85af2db
fix: share single Worker across all files, fix artboard property data…
mfazekas 14e0615
fix: wire up trigger property to experimental fire/stream API
mfazekas dac6589
fix: set fit after view setup to fix .layout mode on initial render
mfazekas e1b6e21
test: add advanced data binding harness tests
mfazekas d9fa0ee
fix: guard negative index in legacy viewModelByIndex and createInstan…
mfazekas 2bb40b6
fix: correct trigger property listener task type signature
mfazekas 9032b01
fix: embed SPM RiveRuntime.framework via Podfile post_install hook
mfazekas 5f05b1b
refactor: split Android into legacy/experimental backend directories
mfazekas 5425329
feat: implement Android experimental backend using new app.rive.* API
mfazekas b2c4a11
feat: implement Android experimental backend with CommandQueue API
mfazekas 67d2662
feat: migrate getEnums() from sync to async (Promise)
mfazekas 004e195
fix: color property overflow and test tolerance for cross-platform di…
mfazekas 10064aa
feat: add backend property to RiveFileFactory for runtime detection
mfazekas 4452056
feat: migrate viewModelByIndex, createInstanceByIndex, viewModel to a…
mfazekas 2af7dc1
fix: lint formatting in ViewModel spec and harness test
mfazekas 60a054e
ci: add experimental runtime harness tests for iOS and Android
mfazekas a0937f5
ci: increase iOS experimental harness timeout to 90min for cold builds
mfazekas 61729cc
fix: handle throwing Worker() init in rive-ios 6.15.1
mfazekas 15ae1ad
fix: experimental iOS instance lookup and test guards
mfazekas f6fd208
feat: add async APIs for RiveFile/ViewModel and fix experimental inst…
mfazekas 89301d5
chore: upgrade rive-ios SPM to 6.15.2
mfazekas b4e43e5
fix: only allow snakeLizard enum on android legacy backend
mfazekas 28f1584
test: add useViewModelInstance e2e harness tests
mfazekas 5fdf082
fix: implement color property get/listen and fix UInt32 crash on expe…
mfazekas a2f0723
feat(ios): decouple SPM from experimental runtime toggle
mfazekas 54e8ef8
fix: unify USE_RIVE_NEW_API flag, replace SPM with CocoaPods, fix exp…
mfazekas 418db86
fix: skip autoPlay test on both experimental backends
mfazekas b1ee80e
fix: remove unused Platform import
mfazekas 7800951
chore: update nitrogen generated files
mfazekas c4bde18
fix: use ArrayBuffer instead of ArrayBufferHolder in new HybridRiveFi…
mfazekas c0f5083
feat: add async versions of viewModelCount, artboardCount, artboardNames
mfazekas ed2561a
feat: add async alternatives for ViewModel property value getters
mfazekas afe36ad
fix: add missing Promise import in experimental Android property file…
mfazekas ed8c055
ci: remove android style guide enforcement from ktlint
mfazekas f9c7ffe
fix(kotlin): fix all ktlint violations and add lint:fix:kotlin script
mfazekas 70a40fc
ci: fail lint-kotlin job on ktlint errors
mfazekas 53a164e
feat: add explicit type field to ResolvedReferencedAsset for asset lo…
mfazekas 9048850
fix: format import in ReferencedAssets.ts to satisfy Prettier
mfazekas dc854d2
chore: re-run nitrogen to regenerate bridge code for RiveAssetType/ty…
mfazekas 3c8c246
fix: disable function-naming ktlint rule for Composable PascalCase fu…
mfazekas 05690e0
fix: apply ktlint auto-format to ComposeTestActivity
mfazekas 0e84a06
fix(ios): update ExperimentalAssetLoader to use typed RiveAssetType enum
mfazekas 6484abe
fix(android): update ExperimentalAssetLoader to use typed RiveAssetTy…
mfazekas e55aec9
refactor: API cleanup — validate option, createBlankInstanceAsync ren…
mfazekas 8a814a1
fix(ios): correct set(value:) argument label to match generated protocol
mfazekas ad859b1
fix(ios): createInstanceByIndex(Async) now respects the index
mfazekas ab8489d
fix: remove createInstanceByIndexAsync, fix createInstanceByIndex on …
mfazekas 80af621
fix(ios): implement propertyCount and instanceCount using runtime APIs
mfazekas 8e5e724
test: strengthen replaceViewModel assertion to verify actual replacement
mfazekas 1f7e7cf
fix(ios): don't set instanceName to property path for nested VMIs
mfazekas 3538281
fix(android): remove VM name heuristic, throw on unsupported ops for …
mfazekas 77466c3
fix: update Podfile.lock to RiveRuntime 6.17.0 from main
mfazekas 46fc56a
chore: regenerate nitrogen bindings after rebase
mfazekas 4279807
fix: remove duplicate async methods in legacy files, make HybridRiveV…
mfazekas 94bc586
fix: add missing createInstanceAsync to experimental backends
mfazekas af9aa90
fix: remove redundant createInstanceAsync, keep only createBlankInsta…
mfazekas 2109f62
fix: use yarn nitrogen (with postprocess), fix ktlint blank line
mfazekas 3572a40
chore: add Issue189 reproducer and nodefaultbouncing.riv from fix/and…
mfazekas 3307e43
fix(ios-exp): skip auto-binding when artboard has no default ViewModel
mfazekas 9c00813
Fix "0x1 not found" error when artboard has no default ViewModel on A…
mfazekas 2158102
fix: enable experimental API flag, await Worker init, update Podfile.…
mfazekas a95c049
fix: update test harnesses for useViewModelInstance {instance, error}…
mfazekas 0f44f89
fix: ktlint spacing between declarations with comments
mfazekas 623d089
test: skip Android experimental tests that need rive-android#443
mfazekas 29f27d9
test: clarify skip reasons for Android experimental test guards
mfazekas 4f84615
fix: clean up legacy files to match upstream, fix Issue159 error type
mfazekas 1918b0e
fix: make legacy HybridViewModel identical to main
mfazekas dc95c4a
feat: make experimental runtime the default, legacy opt-in via USE_RI…
mfazekas a9850b5
refactor: rename android/src/experimental to android/src/new to match…
mfazekas 0afea6e
fix: add missing getPropertyCountAsync/getInstanceCountAsync to new b…
mfazekas 7633e10
chore: enable prerelease (beta) versioning for 0.5.0 release track
mfazekas 237700c
fix(ios): add @MainActor to RiveReactNativeView, guard stale config t…
mfazekas b6bbb50
fix(ios): make awaitViewReady reentrant, support multiple callers
mfazekas 5ebffbb
fix(android): use RuntimeException instead of Error for recoverable f…
mfazekas 5656138
fix: log error instead of swallowing in createInstanceByName catch
mfazekas 42d4540
fix(android): log warning when inferFromMagicBytes falls back to IMAG…
mfazekas e6ac484
fix(ios): add MainActor.assumeIsolated for calls into @MainActor Rive…
mfazekas 067bbea
fix(ios): port Xcode 26 ODR workaround from main into podspec
mfazekas 4b5e283
fix(ios): add missing try to MainActor.assumeIsolated in afterUpdate
mfazekas 219c609
fix(ios): use onMainSync instead of MainActor.assumeIsolated for JS-c…
mfazekas 0b2f05f
fix(ios): make onMainSync provide @MainActor isolation, fix infinite …
mfazekas 13f079d
fix(ios): use Result to propagate errors from onMainSync across dispa…
mfazekas 652c872
fix(android): use device density for Fit.Layout default scale factor …
mfazekas 359c540
fix(android): use device density for Fit.Layout in experimental backe…
mfazekas fb86bf0
feat: add RiveLogger with configurable JS handler and deprecation war…
mfazekas 24bf675
fix(ios): defer fit assignment until MTKView is ready in experimental…
mfazekas d545711
feat: add RiveLog.setLogLevel() to filter log output (#232)
mfazekas 32f85f2
chore(ios): bump rive-ios to 6.19.1 (#233)
mfazekas 018c63d
fix(ios): add backend property to legacy HybridRiveFileFactory (#236)
mfazekas dcfc431
fix(ios): prevent crash on color values with high alpha (#234)
mfazekas f9d75e4
fix(ios): pass fit in constructor, OOB asset improvements (#237)
mfazekas 8a943df
feat: add async variants for ViewModelListProperty mutation methods
mfazekas 4ba5dd6
fix: remove pinned rive-android version from example app
mfazekas cda21e6
chore: upgrade react-native-nitro-modules to 0.35.6
mfazekas 6af4fdd
chore: remove ComposeTestActivity and LegacyTestActivity from example…
mfazekas e509ad3
chore(ios): bump rive-ios to 6.19.2
mfazekas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
android/src/main/java/com/margelo/nitro/rive/DeprecationWarning.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
22
android/src/main/java/com/margelo/nitro/rive/HybridRiveLogger.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.