Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ae77a16
feat: experimental iOS Rive backend with synchronous API
mfazekas Feb 9, 2026
fe4ad44
chore: move docs to .local/docs, remove from git
mfazekas Feb 9, 2026
6835169
refactor: remove ExperimentalFileSource from legacy backend
mfazekas Feb 9, 2026
39f3555
fix: restore whitespace in legacy files, remove fragile asset type gu…
mfazekas Feb 9, 2026
242b054
fix: share single Worker across all files, fix artboard property data…
mfazekas Feb 9, 2026
0277b37
fix: wire up trigger property to experimental fire/stream API
mfazekas Feb 9, 2026
3af56c9
fix: set fit after view setup to fix .layout mode on initial render
mfazekas Feb 11, 2026
e9d616a
test: add advanced data binding harness tests
mfazekas Feb 11, 2026
ff4e56d
fix: guard negative index in legacy viewModelByIndex and createInstan…
mfazekas Feb 11, 2026
81772cb
fix: correct trigger property listener task type signature
mfazekas Feb 11, 2026
374ef11
fix: embed SPM RiveRuntime.framework via Podfile post_install hook
mfazekas Feb 11, 2026
5cbeca4
refactor: split Android into legacy/experimental backend directories
mfazekas Feb 12, 2026
0bd025b
feat: implement Android experimental backend using new app.rive.* API
mfazekas Feb 12, 2026
d5a2149
feat: implement Android experimental backend with CommandQueue API
mfazekas Feb 16, 2026
2399ec1
feat: migrate getEnums() from sync to async (Promise)
mfazekas Feb 17, 2026
0362ac8
fix: color property overflow and test tolerance for cross-platform di…
mfazekas Feb 17, 2026
d1ee198
feat: add backend property to RiveFileFactory for runtime detection
mfazekas Feb 17, 2026
e4c46ac
feat: migrate viewModelByIndex, createInstanceByIndex, viewModel to a…
mfazekas Feb 17, 2026
f6b00d2
fix: lint formatting in ViewModel spec and harness test
mfazekas Feb 17, 2026
d26db81
ci: add experimental runtime harness tests for iOS and Android
mfazekas Feb 18, 2026
2bc2ea2
ci: increase iOS experimental harness timeout to 90min for cold builds
mfazekas Feb 18, 2026
4fe6ee1
fix: handle throwing Worker() init in rive-ios 6.15.1
mfazekas Feb 18, 2026
bf28c06
fix: experimental iOS instance lookup and test guards
mfazekas Feb 19, 2026
482d9ea
feat: add async APIs for RiveFile/ViewModel and fix experimental inst…
mfazekas Feb 19, 2026
73eb9d2
chore: upgrade rive-ios SPM to 6.15.2
mfazekas Feb 19, 2026
f0abd7d
fix: only allow snakeLizard enum on android legacy backend
mfazekas Feb 19, 2026
651f09a
test: add useViewModelInstance e2e harness tests
mfazekas Feb 19, 2026
44681b5
fix: implement color property get/listen and fix UInt32 crash on expe…
mfazekas Feb 26, 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
195 changes: 195 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,198 @@ jobs:
run: |
echo "=== Checking logcat for errors ==="
adb logcat -d -s ReactNativeJS:* RiveExample:* RNRive:* | tail -200 || echo "No logs found"

test-harness-ios-experimental:
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 }}-experimental-cocoapods-${{ hashFiles('example/ios/Podfile', '*.podspec') }}
restore-keys: |
${{ runner.os }}-experimental-cocoapods-

- name: Install cocoapods (experimental SPM)
if: steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
cd example
bundle install
USE_RIVE_SPM=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-experimental-build-${{ env.XCODE_VERSION }}-${{ hashFiles('yarn.lock', 'ios/**', 'nitrogen/generated/ios/**', '*.podspec', 'example/ios/Podfile', 'example/ios/RiveExample/**') }}
restore-keys: |
${{ runner.os }}-ios-experimental-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-experimental:
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 experimental Rive API
run: |
sed -i 's/USE_RIVE_NEW_API=false/USE_RIVE_NEW_API=true/' example/android/gradle.properties

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-harness-experimental-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-harness-experimental-
${{ 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-experimental-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-experimental-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"
30 changes: 27 additions & 3 deletions RNRive.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ if !rive_ios_version && package['runtimeVersions'] && package['runtimeVersions']
rive_ios_version = package['runtimeVersions']['ios']
end

if !rive_ios_version
use_rive_spm = ENV['USE_RIVE_SPM'] == '1' || (defined?($UseRiveSPM) && $UseRiveSPM)

if !use_rive_spm && !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}"
if use_rive_spm
Pod::UI.puts "@rive-app/react-native: Using RiveRuntime via Swift Package Manager"
else
Pod::UI.puts "@rive-app/react-native: Rive iOS SDK #{rive_ios_version}"
end

Pod::Spec.new do |s|
s.name = "RNRive"
Expand All @@ -43,11 +49,29 @@ Pod::Spec.new do |s|

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

if use_rive_spm
s.exclude_files = ["ios/legacy/**"]
else
s.exclude_files = ["ios/new/**"]
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
if use_rive_spm
spm_dependency(s,
url: 'https://github.com/rive-app/rive-ios.git',
requirement: {kind: 'upToNextMajorVersion', minimumVersion: '6.15.0'},
products: ['RiveRuntime']
)
else
s.dependency "RiveRuntime", rive_ios_version
end

install_modules_dependencies(s)

if use_rive_spm
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 @@ -107,10 +107,17 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

def useNewRiveApi = rootProject.findProperty('USE_RIVE_NEW_API') == 'true'

sourceSets {
main {
java.srcDirs += ["generated/java",
"generated/jni"]
if (useNewRiveApi) {
java.srcDirs += ["src/experimental/java"]
} else {
java.srcDirs += ["src/legacy/java"]
}
}
}
}
Expand Down
Loading
Loading