-
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
120
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
120 commits
Select commit
Hold shift + click to select a range
1712514
feat: experimental iOS Rive backend with synchronous API
mfazekas 9e99082
chore: move docs to .local/docs, remove from git
mfazekas e9fb0b8
refactor: remove ExperimentalFileSource from legacy backend
mfazekas fe7d65a
fix: restore whitespace in legacy files, remove fragile asset type gu…
mfazekas 7e871f1
fix: share single Worker across all files, fix artboard property data…
mfazekas 916ed2b
fix: wire up trigger property to experimental fire/stream API
mfazekas 8e3c80d
fix: set fit after view setup to fix .layout mode on initial render
mfazekas ecfc8db
test: add advanced data binding harness tests
mfazekas b75083f
fix: guard negative index in legacy viewModelByIndex and createInstan…
mfazekas 945b024
fix: correct trigger property listener task type signature
mfazekas 8042598
fix: embed SPM RiveRuntime.framework via Podfile post_install hook
mfazekas aabb2ae
refactor: split Android into legacy/experimental backend directories
mfazekas 354aa0b
feat: implement Android experimental backend using new app.rive.* API
mfazekas d73e553
feat: implement Android experimental backend with CommandQueue API
mfazekas 2edefee
feat: migrate getEnums() from sync to async (Promise)
mfazekas b68693a
fix: color property overflow and test tolerance for cross-platform di…
mfazekas d83d286
feat: add backend property to RiveFileFactory for runtime detection
mfazekas 66bcf3d
feat: migrate viewModelByIndex, createInstanceByIndex, viewModel to a…
mfazekas 90b2d80
fix: lint formatting in ViewModel spec and harness test
mfazekas 0851492
ci: add experimental runtime harness tests for iOS and Android
mfazekas 1614960
ci: increase iOS experimental harness timeout to 90min for cold builds
mfazekas 27e9c44
fix: handle throwing Worker() init in rive-ios 6.15.1
mfazekas 052a3ff
fix: experimental iOS instance lookup and test guards
mfazekas 60d1bf0
feat: add async APIs for RiveFile/ViewModel and fix experimental inst…
mfazekas 011c713
chore: upgrade rive-ios SPM to 6.15.2
mfazekas 18969b3
fix: only allow snakeLizard enum on android legacy backend
mfazekas 82966e8
test: add useViewModelInstance e2e harness tests
mfazekas 5a0c63f
fix: implement color property get/listen and fix UInt32 crash on expe…
mfazekas f130fdb
feat(ios): decouple SPM from experimental runtime toggle
mfazekas adf3408
fix: unify USE_RIVE_NEW_API flag, replace SPM with CocoaPods, fix exp…
mfazekas ded01e2
fix: skip autoPlay test on both experimental backends
mfazekas ce5e501
fix: remove unused Platform import
mfazekas 1db6063
chore: update nitrogen generated files
mfazekas c4ed241
fix: use ArrayBuffer instead of ArrayBufferHolder in new HybridRiveFi…
mfazekas fbd3dde
feat: add async versions of viewModelCount, artboardCount, artboardNames
mfazekas e86aca5
feat: add async alternatives for ViewModel property value getters
mfazekas 0fe7dd4
fix: add missing Promise import in experimental Android property file…
mfazekas 8720ff4
ci: remove android style guide enforcement from ktlint
mfazekas 1f0fe93
fix(kotlin): fix all ktlint violations and add lint:fix:kotlin script
mfazekas a525b93
ci: fail lint-kotlin job on ktlint errors
mfazekas 3ccb8fa
feat: add explicit type field to ResolvedReferencedAsset for asset lo…
mfazekas 205c52d
fix: format import in ReferencedAssets.ts to satisfy Prettier
mfazekas eabcd56
chore: re-run nitrogen to regenerate bridge code for RiveAssetType/ty…
mfazekas cba8e6c
fix: disable function-naming ktlint rule for Composable PascalCase fu…
mfazekas b738462
fix: apply ktlint auto-format to ComposeTestActivity
mfazekas c1f6849
fix(ios): update ExperimentalAssetLoader to use typed RiveAssetType enum
mfazekas 01f7a73
fix(android): update ExperimentalAssetLoader to use typed RiveAssetTy…
mfazekas 217c0f1
refactor: API cleanup — validate option, createBlankInstanceAsync ren…
mfazekas e8d739a
fix(ios): correct set(value:) argument label to match generated protocol
mfazekas a24b72a
fix(ios): createInstanceByIndex(Async) now respects the index
mfazekas 514622b
fix: remove createInstanceByIndexAsync, fix createInstanceByIndex on …
mfazekas f3a1f71
fix(ios): implement propertyCount and instanceCount using runtime APIs
mfazekas dc1c467
test: strengthen replaceViewModel assertion to verify actual replacement
mfazekas 70823dd
fix(ios): don't set instanceName to property path for nested VMIs
mfazekas dec2314
fix(android): remove VM name heuristic, throw on unsupported ops for …
mfazekas 5292880
fix: update Podfile.lock to RiveRuntime 6.17.0 from main
mfazekas e81146b
chore: regenerate nitrogen bindings after rebase
mfazekas f3aa2d4
fix: remove duplicate async methods in legacy files, make HybridRiveV…
mfazekas 44bdc3b
fix: add missing createInstanceAsync to experimental backends
mfazekas 05f8848
fix: remove redundant createInstanceAsync, keep only createBlankInsta…
mfazekas 4cb5e8d
fix: use yarn nitrogen (with postprocess), fix ktlint blank line
mfazekas 585ad21
chore: add Issue189 reproducer and nodefaultbouncing.riv from fix/and…
mfazekas 507461f
fix(ios-exp): skip auto-binding when artboard has no default ViewModel
mfazekas dddfc01
Fix "0x1 not found" error when artboard has no default ViewModel on A…
mfazekas ad07936
fix: enable experimental API flag, await Worker init, update Podfile.…
mfazekas 6469954
fix: update test harnesses for useViewModelInstance {instance, error}…
mfazekas 4995139
fix: ktlint spacing between declarations with comments
mfazekas 965244c
test: skip Android experimental tests that need rive-android#443
mfazekas e168423
test: clarify skip reasons for Android experimental test guards
mfazekas c9c3e37
fix: clean up legacy files to match upstream, fix Issue159 error type
mfazekas 3b57622
fix: make legacy HybridViewModel identical to main
mfazekas 7ea43bd
feat: make experimental runtime the default, legacy opt-in via USE_RI…
mfazekas d075a31
refactor: rename android/src/experimental to android/src/new to match…
mfazekas 3d3d021
fix: add missing getPropertyCountAsync/getInstanceCountAsync to new b…
mfazekas 6547aae
chore: enable prerelease (beta) versioning for 0.5.0 release track
mfazekas 3faf214
fix(ios): add @MainActor to RiveReactNativeView, guard stale config t…
mfazekas 04fa5de
fix(ios): make awaitViewReady reentrant, support multiple callers
mfazekas 0de6808
fix(android): use RuntimeException instead of Error for recoverable f…
mfazekas da5b760
fix: log error instead of swallowing in createInstanceByName catch
mfazekas 2cf4225
fix(android): log warning when inferFromMagicBytes falls back to IMAG…
mfazekas f0f469a
fix(ios): add MainActor.assumeIsolated for calls into @MainActor Rive…
mfazekas b58cf7e
fix(ios): port Xcode 26 ODR workaround from main into podspec
mfazekas ac9feeb
fix(ios): add missing try to MainActor.assumeIsolated in afterUpdate
mfazekas 8e9ed19
fix(ios): use onMainSync instead of MainActor.assumeIsolated for JS-c…
mfazekas 0636cc4
fix(ios): make onMainSync provide @MainActor isolation, fix infinite …
mfazekas 5bf8e95
fix(ios): use Result to propagate errors from onMainSync across dispa…
mfazekas 48d5e76
fix(android): use device density for Fit.Layout default scale factor …
mfazekas 1a1c56e
fix(android): use device density for Fit.Layout in experimental backe…
mfazekas d4f04e8
feat: add RiveLogger with configurable JS handler and deprecation war…
mfazekas 59ea4fd
fix(ios): defer fit assignment until MTKView is ready in experimental…
mfazekas df1cb4e
feat: add RiveLog.setLogLevel() to filter log output (#232)
mfazekas db8f9d1
chore(ios): bump rive-ios to 6.19.1 (#233)
mfazekas 37d2c80
fix(ios): add backend property to legacy HybridRiveFileFactory (#236)
mfazekas 311befe
fix(ios): prevent crash on color values with high alpha (#234)
mfazekas 1afd4b2
fix(ios): pass fit in constructor, OOB asset improvements (#237)
mfazekas 04ae76e
feat: add async variants for ViewModelListProperty mutation methods
mfazekas 7974649
fix: remove pinned rive-android version from example app
mfazekas 1e4587b
chore: upgrade react-native-nitro-modules to 0.35.6
mfazekas d2a7079
chore: remove ComposeTestActivity and LegacyTestActivity from example…
mfazekas 1ea65c2
chore(ios): bump rive-ios to 6.19.2
mfazekas 2eb2f13
fix(ios): remove Xcode 26 modulemap stripping workaround (#239)
mfazekas 5722b28
chore(ios): remove 'Experimental' naming and debug logs (#240)
mfazekas 31c2896
fix(android): prevent draw errors on view dispose (#243)
mfazekas 75e314d
fix(android): await asset registration before file load, fix dispose …
mfazekas 3ac6c87
feat: add native iOS code coverage integration
mfazekas 6be7e5b
fix(ios): remove stale experimental iOS test skips (#246)
mfazekas 880d620
chore(android): rename ExperimentalAssetLoader to AssetLoader (#245)
mfazekas b849759
chore: add kanit_regular.ttf to expo example assets (#242)
mfazekas 18bcbdb
chore(ios): bump rive-ios to 6.20.0 (#241)
mfazekas a8fd9b7
feat: add properties enumeration to ViewModel and ViewModelInstance (…
mfazekas 57a8dca
chore: bump example app to React Native 0.80.3 (#254)
mfazekas 91df8bf
chore: bump react-native-harness to 1.1.0 (#253)
mfazekas 7400e00
test: add async API coverage tests (#258)
mfazekas 0eca278
chore: upgrade react-native-harness to 1.2.0
mfazekas 6a5913d
chore: fix prettier formatting
mfazekas b9a16a5
Bump RiveRuntime iOS SDK to 6.20.4 (#270)
mfazekas eb9497c
Add ViewModel property type test coverage (#273)
mfazekas dc88ec9
Add font config and asset loading tests (#274)
mfazekas 4a0956e
Add fromBytes, RiveImages, log level, and view method tests (#275)
mfazekas 42e7d76
Upgrade react-native-harness to 1.3.0 (#278)
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # Native iOS Code Coverage | ||
|
|
||
| Native iOS code coverage is integrated via `react-native-harness` 1.2.0+, which includes | ||
| `@react-native-harness/coverage-ios` support out of the box. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Xcode with `xcrun llvm-profdata` and `xcrun llvm-cov` available | ||
| - iOS simulator booted (the harness test runner handles this) | ||
|
|
||
| ## Configuration | ||
|
|
||
| The harness config (`example/rn-harness.config.mjs`) specifies which CocoaPods targets | ||
| get instrumented: | ||
|
|
||
| ```js | ||
| coverage: { | ||
| native: { | ||
| ios: { | ||
| pods: ['RNRive', 'RiveRuntime'], | ||
| }, | ||
| }, | ||
| }, | ||
| ``` | ||
|
|
||
| The `pods` array lists which CocoaPods targets get instrumented with | ||
| `-profile-generate -profile-coverage-mapping` (Swift) and | ||
| `-fprofile-instr-generate -fcoverage-mapping` (C/ObjC). | ||
|
|
||
| Start with just `['RNRive']` if you only care about your own code. | ||
| Add `'RiveRuntime'` to also cover the upstream Rive SDK. | ||
|
|
||
| ## Running | ||
|
|
||
| ```bash | ||
| cd example | ||
|
|
||
| # Pod install will auto-instrument the configured pods | ||
| cd ios && pod install && cd .. | ||
|
|
||
| # Clean build required after instrumentation changes | ||
| xcodebuild clean -workspace ios/RiveExample.xcworkspace -scheme RiveExample | ||
| yarn build:ios | ||
|
|
||
| # Run tests with coverage | ||
| yarn test:harness:ios:coverage | ||
| ``` | ||
|
|
||
| When tests finish, the harness merges `.profraw` files and produces an `.lcov` report. | ||
|
|
||
| Profraw files are written to `/tmp/harness-coverage/` which persists across app reinstalls | ||
| on iOS simulators. | ||
|
|
||
| ## Viewing Results | ||
|
|
||
| ```bash | ||
| # Quick summary | ||
| lcov --summary coverage/native-ios.lcov | ||
|
|
||
| # Generate HTML report | ||
| genhtml coverage/native-ios.lcov -o coverage/native-ios-html | ||
| open coverage/native-ios-html/index.html | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **No `.profraw` files generated:** | ||
| - Verify `pod install` printed the `[HarnessCoverage] Instrumenting pods` message | ||
| - Ensure the app was rebuilt from scratch after `pod install` | ||
| - Check simulator logs: `xcrun simctl spawn booted log show --predicate 'message CONTAINS "HarnessCoverage"' --last 1m` | ||
|
|
||
| **`xcrun llvm-cov` fails:** | ||
| - The `.profraw` file must match the exact binary that produced it — do a clean build | ||
|
|
||
| **Xcode 16+ / debug dylibs:** | ||
| - The app binary may be a thin stub; the real code is in `RiveExample.debug.dylib` | ||
| - The coverage collector handles this automatically via `findAppExecutable()` |
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
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.