Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTextRunValue crashes app on iOS simulator #275

Open
nalnir opened this issue Nov 16, 2024 · 0 comments
Open

setTextRunValue crashes app on iOS simulator #275

nalnir opened this issue Nov 16, 2024 · 0 comments

Comments

@nalnir
Copy link

nalnir commented Nov 16, 2024

"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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant