Skip to content

Commit 12aa483

Browse files
authored
fix: add missing reset() method to iOS RiveReactNativeView (#62)
Also fix CI turbo cache keys to include native files so Swift/Kotlin changes invalidate the cache. Fixes #61
1 parent 391141c commit 12aa483

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
uses: actions/cache@v4
107107
with:
108108
path: ${{ env.TURBO_CACHE_DIR }}
109-
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
109+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock', 'android/**', 'nitrogen/generated/android/**') }}
110110
restore-keys: |
111111
${{ runner.os }}-turborepo-android-
112112
@@ -163,7 +163,7 @@ jobs:
163163
uses: actions/cache@v4
164164
with:
165165
path: ${{ env.TURBO_CACHE_DIR }}
166-
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
166+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock', 'ios/**', 'nitrogen/generated/ios/**', '*.podspec') }}
167167
restore-keys: |
168168
${{ runner.os }}-turborepo-ios-
169169

ios/RiveReactNativeView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ class RiveReactNativeView: UIView, RiveStateMachineDelegate {
135135
baseViewModel?.pause()
136136
}
137137

138+
@MainActor
139+
func reset() {
140+
baseViewModel?.reset()
141+
}
142+
138143
func refreshAfterAssetChange() {
139144
if baseViewModel?.isPlaying == false {
140145
play()

0 commit comments

Comments
 (0)