Rive iOS

repository·main·Indexed 21 days ago

https://github.com/rive-app/rive-ios

A runtime library for the Rive design tool that enables interactive, real-time animations on iOS, macOS, tvOS, and visionOS. It provides high-level APIs for UIKit, AppKit, and SwiftUI to load assets, manage animation playback, and control state machines via the RiveViewModel API.

Tokens
347
Snippets
1
Records
4
Agent score
24%

What's inside rive-ios

  1. Use the RiveViewModel API

    main

    The high-level RiveViewModel API is the primary way to interact with Rive animations in UIKit and SwiftUI. Common tasks include:

    • Setting a Rive file via a URL or a local asset in the app bundle.
    • Configuring layout and loop mode options.
    • Displaying single or multiple animations/artboards within a single component.
    • Setting up and manipulating state machines using inputs.
  2. Run Rive runtime examples

    main

    To explore how to use the runtime, you can run the provided examples in the Example-iOS/ folder:

    1. Open RiveRuntime.xcworkspace in Xcode.
    2. Select a preview scheme: Preview (iOS) or Preview (macOS).
    3. Run the scheme to see the examples in action.

    Note: Do not use the other targets unless you are contributing to the underlying C++ runtime, as they require additional local configuration.

    Open RiveRuntime.xcworkspace in Xcode and ensure the selected scheme is set to Preview (iOS) or Preview (macOS)