philter 9c299cd72a chore: Pass Lua VM from editor when decoding runtime File (#11458) f57124001d
The C++ runtime requires a ScriptingVM and lua_State to run scripts. Previously when a runtime File was built, we would always instance a ScriptingVM and lua_State. At runtime, this is required, however, when building the runtime in the editor, this resulted in additional objects being created that weren't needed. This PR passes the lua_State into File::import so that the file will only create the ScriptingVM once and either use the passed in lua_State or instance a new one if none is passed.
2026-01-15 20:37:31 +00:00
2026-01-13 14:09:46 +00:00
2021-06-11 18:42:37 +01:00
2026-01-13 14:09:38 +00:00
2026-01-13 14:09:38 +00:00
2023-12-05 21:23:08 +00:00
2026-01-13 14:09:46 +00:00
2020-08-26 11:46:54 -07:00
2026-01-13 14:09:38 +00:00
2026-01-13 14:09:38 +00:00
2026-01-13 14:09:46 +00:00

Emerge badge Discord badge Twitter handle

Rive iOS

Rive hero image

An iOS/macOS runtime library for Rive that supports both UIKit, AppKit, and SwiftUI.

The library is distributed both through Swift Package Manager and Cocoapods.

Table of contents

Rive overview

Rive is a real-time interactive design and animation tool that helps teams create and run interactive animations anywhere. Designers and developers use our collaborative editor to create motion graphics that respond to different states and user inputs. Our lightweight open-source runtime libraries allow them to load their animations into apps, games, and websites.

🏡 Homepage

📘 Rive docs

🛠 Rive Community

Getting started

To get started with Rive Apple runtime, check out the following resources:

For more information, see the Runtime sections of the Rive help documentation:

Supported platforms

Supported platforms include iOS, macOS, tvOS, and visionOS. For the minimum supported versions, see Package.swift.

Examples

Check out the Example-iOS/ folder for code examples on how to use the Rive Apple runtime.

Open RiveRuntime.xcworkspace in Xcode and ensure the selected scheme is set to Preview (iOS) or Preview (macOS), based on what platform you want to preview. These schemes make use of the Swift Package Manager package of the Rive Apple runtime, and are the schemes you should use to preview the Rive examples.

Note: The other targets are for local development and require additional configuration and set-up. See Customizing the build schemes for a project for instructions to switch schemes, and CONTRIBUTING.md for more information. You should not use these schemes unless you are making changes to the underlying C++ runtime.

The example showcases a number of ways to use the high-level RiveViewModel API through UIKit and SwiftUI examples, including:

  • Setting a Rive file via a URL or asset in the bundle
  • Setting layout and loop mode options
  • Displaying single or multiple animations / artboards on one component
  • Setting up and maniuplating a state machine via inputs
  • ...and more!

Awesome Rive

For even more examples and resources on using Rive at runtime or in other tools, checkout the awesome-rive repo.

Migration guides

Using an older version of the runtime and need to learn how to upgrade to the latest version? Check out the migration guides below in our help center that help guide you through version bumps; breaking changes and all!

Migration Guides

Contributing

We love contributions! Check out our contributing docs to get more details into how to run this project, the examples, and more all locally.

Issues

Have an issue with using the runtime, or want to suggest a feature/API to help make your development life better? Log an issue in our issues tab! You can also browse older issues and discussion threads there to see solutions that may have worked for common problems.

Description
iOS runtime for Rive
Readme MIT 2.4 GiB
Languages
Swift 48.9%
Objective-C++ 31.4%
Objective-C 12.1%
Shell 6.2%
C++ 1%
Other 0.4%