From 4424429b82290b51857bb43e2c3369e56f8b3f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Thu, 1 Oct 2026 09:29:19 +0200 Subject: [PATCH 1/2] fix: bump rive-ios to 6.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the pinned iOS runtime from 6.26.0 to 6.28.0, which picks up 6.27.0 as well (6.27.0 itself never reached CocoaPods trunk). 6.28.0 fixes Metal drawables being sized through ancestor transforms on devices where nativeScale != scale (Display Zoom, iPhone mini and Plus), which squashed RiveViews under a rotated parent and left them blank under a zero-scaled one, in both the legacy and the new runtime. It also fixes hidden paints not refreshing trim-path effects when they become visible, and failed view-model property reads emitting invalid value callbacks. Adds the Issue393DisplayZoom reproducer page (control, rotated and scale(0)→1 cells, plus Remount and Resize). Fixes #393 --- .../src/reproducers/Issue393DisplayZoom.tsx | 142 ++++++++++++++++++ ios/new/RiveRuntimeLogger.swift | 2 +- package.json | 2 +- 3 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 example/src/reproducers/Issue393DisplayZoom.tsx diff --git a/example/src/reproducers/Issue393DisplayZoom.tsx b/example/src/reproducers/Issue393DisplayZoom.tsx new file mode 100644 index 00000000..db6cbdd3 --- /dev/null +++ b/example/src/reproducers/Issue393DisplayZoom.tsx @@ -0,0 +1,142 @@ +import { useEffect, useState } from 'react'; +import { + View, + Text, + StyleSheet, + Pressable, + type ViewStyle, +} from 'react-native'; +import { + RiveView, + Fit, + useRiveFile, + type RiveFile, +} from '@rive-app/react-native'; +import { type Metadata } from '../shared/metadata'; + +/** + * Issue #393: on iOS devices where UIScreen.nativeScale != scale (Display + * Zoom, iPhone mini and Plus), MTKView sizes its drawable through ancestor + * transforms. A rotated parent squashes the artboard; a parent at scale(0) + * when the view mounts leaves it blank after the scale returns to 1. + * + * Run on an iPhone 13 mini simulator. All three artboards should keep the + * same aspect ratio, including after Remount and Resize. + */ + +const W = 100; +const H = 148; +const ZERO_SCALE_HOLD_MS = 1500; + +function Cell({ + label, + transform, + file, + resized, +}: { + label: string; + transform: ViewStyle['transform']; + file: RiveFile; + resized: boolean; +}) { + const size = resized ? styles.resized : styles.size; + return ( + + {label} + + + + + ); +} + +export default function Issue393DisplayZoom() { + const { riveFile, error } = useRiveFile( + require('../../assets/rive/rewards.riv') + ); + const [generation, setGeneration] = useState(0); + const [zeroScaled, setZeroScaled] = useState(true); + const [resized, setResized] = useState(false); + + useEffect(() => { + setZeroScaled(true); + const timer = setTimeout(() => setZeroScaled(false), ZERO_SCALE_HOLD_MS); + return () => clearTimeout(timer); + }, [generation, riveFile]); + + return ( + + + generation {generation} ·{' '} + {zeroScaled ? 'scale(0) holding' : 'scale(0) released'} + + {error ? {String(error)} : null} + {riveFile ? ( + + + + + + ) : ( + loading… + )} + setGeneration((g) => g + 1)} + > + Remount + + setResized((r) => !r)}> + + {resized ? 'Restore size' : 'Resize'} + + + + ); +} + +Issue393DisplayZoom.metadata = { + name: 'Issue #393: Display Zoom drawable', + description: + 'iOS RiveView squashed or blank under a rotated or zero-scaled parent', +} satisfies Metadata; + +const styles = StyleSheet.create({ + container: { flex: 1, backgroundColor: '#fff', padding: 12 }, + subtitle: { fontSize: 12, color: '#666', textAlign: 'center', margin: 8 }, + error: { color: 'red', textAlign: 'center' }, + row: { + flexDirection: 'row', + justifyContent: 'space-around', + marginTop: 24, + }, + cell: { alignItems: 'center' }, + cellLabel: { fontSize: 12, marginBottom: 16 }, + frame: { backgroundColor: '#dde6ff' }, + size: { width: W, height: H }, + resized: { width: W * 1.3, height: H * 0.7 }, + button: { + marginTop: 40, + alignSelf: 'center', + backgroundColor: '#007AFF', + paddingHorizontal: 24, + paddingVertical: 12, + borderRadius: 8, + }, + buttonText: { color: '#fff', fontWeight: '600' }, +}); diff --git a/ios/new/RiveRuntimeLogger.swift b/ios/new/RiveRuntimeLogger.swift index 16a6bae6..855a699d 100644 --- a/ios/new/RiveRuntimeLogger.swift +++ b/ios/new/RiveRuntimeLogger.swift @@ -58,7 +58,7 @@ final class RiveRuntimeLogger: RiveRuntime.RiveLog.Logger, @unchecked Sendable { // first frame(s) have no drawable yet; the SDK logs that transient // condition at error level, which LogBox turns into a red screen in dev. // Rendering recovers on the next tick, so forward it as debug instead. - // https://github.com/rive-app/rive-ios/blob/6.26.0/Source/Concurrency/View/RiveUIView.swift#L451-L456 + // https://github.com/rive-app/rive-ios/blob/6.28.0/Source/Concurrency/View/RiveUIView.swift#L501-L506 if case .view = tag, text == "Draw failed: missing drawable" { RiveLog.d(name, "\(text)\(suffix)") return diff --git a/package.json b/package.json index e74fcaf5..c58c0334 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ }, "homepage": "https://github.com/rive-app/rive-nitro-react-native#readme", "runtimeVersions": { - "ios": "6.26.0", + "ios": "6.28.0", "android": "11.12.1" }, "publishConfig": { From 99875515b87996592550e0e60261d406822f533e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Thu, 1 Oct 2026 09:29:51 +0200 Subject: [PATCH 2/2] chore: drop the release-as 0.5.0 pin now that 0.5.0 has shipped --- release-please-config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index e6cf3de5..740d9b5c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -6,8 +6,7 @@ "packages": { ".": { "changelog-path": "CHANGELOG.md", - "include-component-in-tag": false, - "release-as": "0.5.0" + "include-component-in-tag": false } } }