rive-app / rive-app/rive-react-native
setTextRunValue crashes app on iOS simulator
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 783
- Forks
- 81
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 3
Description
"expo": "~51.0.28"
"react-native": "0.74.5"
"rive-react-native": "8.1.0"
-->
Description
When trying to set a text run value the app on iOS crashes. Android works just fine.
Provide a Repro
interface IBadge {
value?: string;
}
export const Badge = ({ value }: IBadge) => {
const riveRef = React.useRef<RiveRef>(null);
useEffect(() => {
riveRef.current?.setTextRunValue("amount", value ?? " ");
}, [value]);
return (
<Rive
artboardName="badge"
stateMachineName="main"
ref={riveRef}
autoplay
url={`https://public.rive.app/community/runtime-files/13780-27374-toptop-badge.riv`}
/>
);
};
Source .riv/.rev file
Expected behavior
Rive component should update text run value without crashing an app.
Screenshots
Device & Versions (please complete the following information)
- Device: iOS Simulator
- OS: iOS 16.4
- NPM Version: 10.8.1
Additional context
I made sure my text run value has a custom name "amount" and it's exported
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Badge reproduction with Expo ~51.0.28, React Native 0.74.5, and rive-react-native 8.1.0 on the iOS 16.4 simulator, then trace the setTextRunValue call from the Rive ref. Use the attached .riv file to reproduce the crash; done means updating the "amount" text run without crashing while Android behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100