Skip to content

setTextRunValue crashes app on iOS simulator #275

Open
@nalnir

Description

@nalnir

"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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions