rive-react-native icon indicating copy to clipboard operation
rive-react-native copied to clipboard

setTextRunValue crashes app on iOS simulator

Open nalnir opened this issue 1 year ago • 1 comments

"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

toptop_-_badge.riv.zip

Expected behavior

Rive component should update text run value without crashing an app.

Screenshots

Screenshot 2024-11-16 at 22 48 51 Screenshot 2024-11-16 at 22 48 57

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

nalnir avatar Nov 16 '24 22:11 nalnir

same issue

zispidd avatar May 02 '25 14:05 zispidd