Skip to content

Loading animations with source doesn't work in Release iOS builds #385

@Nezz

Description

@Nezz

Description

This PR added support for bundling Rive animations like images. However, this broke at some point for iOS release builds (possibly Expo 54).

Provide a Repro

  1. Add a Rive animation to an Expo 54 project:
<Rive source={require('@/assets/animations/Test.riv')} autoplay fit={Fit.Contain} />
  1. Add the following line to metro.config.js to ensure that riv files get bundled:
config.resolver.assetExts.push('riv');
  1. Make a Release build for iOS

Development builds are not affected by this issue as they load the animations from your dev machine

Source .riv/.rev file

Issue is not related to a concrete file

Expected behavior

The animation should load

Actual behavior

The animation fails to load. On this line the plugin expects a URL like this:

file:///path/to/MyApp.app/assets/animation.riv

However, the actual URL is this:

file:///var/mobile/Containers/Data/Application/D96CE0CC-9CE0-445A-99DD-91578B1DCAAF/Library/Application%20Support/.expo-internal/ef6df2fd7a0eb9bae383f61feb81aa26.riv

Screenshots

Device & Versions (please complete the following information)

  • Device: iOS physical device
  • OS: iOS 26.0.1
  • NPM Version: 10.9.3

Additional context

<-- Add any other context about the problem here. -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions