Rive animations integration in mobile app

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Rive animations integration in mobile app
Medium
from 4 hours to 2 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Integrating Rive Animations into Mobile Applications

Rive differs fundamentally from Lottie: it's not an export of a "baked" animation but a runtime engine with a State Machine. The animation responds to input from code—a button tap changes the State Machine state, smoothly transitioning between animation clips. This is powerful and requires understanding how Rive Runtime works inside your app.

Rive Runtime Architecture

A Rive file (.riv) contains artboards, animation clips, and a State Machine. The runtime loads the file, creates an Artboard instance, and controls it via StateMachineController or SimpleAnimation. Rendering uses Rive's own Renderer, which uses Metal on iOS and OpenGL ES 3.0 / Vulkan on Android.

Important: Rive Renderer and the standard Canvas renderer coexist. On Android, runtime versions before 9.x used Canvas renderer by default—slower but more compatible. From 9.x onwards, Rive Renderer is enabled by default and significantly faster for complex mesh animations, but requires OpenGL ES 3.0 (API 18+, covering >99% of devices).

Android Integration

// build.gradle
implementation "app.rive:rive-android:9.6.0"
// Initialize in Application.onCreate() - mandatory!
RiveInitializer.initializer(context)

// In layout XML:
// <app.rive.runtime.kotlin.RiveAnimationView
//     android:id="@+id/riveView"
//     app:riveResource="@raw/my_animation"
//     app:riveStateMachineName="StateMachine" />

// In Activity/Fragment:
val riveView = findViewById<RiveAnimationView>(R.id.riveView)
// Pass input to State Machine:
riveView.setNumberState("StateMachine", "progress", 0.75f)
riveView.setBooleanState("StateMachine", "isActive", true)
riveView.fireState("StateMachine", "triggerName")

RiveInitializer.initializer() must be called once before creating any RiveAnimationView—otherwise you get IllegalStateException: Rive not initialized. Common mistake with lazy DI framework initialization.

iOS Integration

// SPM: https://github.com/rive-app/rive-ios, version 6.x
import RiveRuntime

let riveView = RiveView()
let model = RiveModel(fileName: "my_animation")
let viewModel = RiveViewModel(model, stateMachineName: "StateMachine")
viewModel.setView(riveView)

// Manage State Machine:
try? viewModel.setInput("isActive", value: true)
try? viewModel.setInput("progress", value: 0.75)
try? viewModel.triggerInput("tapTrigger")

For SwiftUI, use RiveViewModel as an ObservableObject:

struct AnimatedButton: View {
    @StateObject private var rvm = RiveViewModel(fileName: "button_animation",
                                                  stateMachineName: "ButtonSM")
    var body: some View {
        rvm.view()
            .onTapGesture { try? rvm.triggerInput("pressed") }
    }
}

Flutter

// pubspec.yaml: rive: ^0.13.0
import 'package:rive/rive.dart';

RiveAnimation.asset(
  'assets/animations/my_animation.riv',
  stateMachines: ['StateMachine'],
  onInit: (artboard) {
    final controller = StateMachineController.fromArtboard(artboard, 'StateMachine');
    artboard.addController(controller!);
    final isActive = controller.findInput<bool>('isActive') as SMIBool;
    isActive.value = true;
  },
)

Common Integration Issues

Rive file created for one artboard but runtime tries to access another—NullPointerException with no clear message. Always explicitly specify artboard name via artboardName parameter.

State Machine input names are case and whitespace sensitive. "Is Active" and "isActive" are different inputs. Verify in Rive Editor before integration.

Large .riv files (>5 MB) with embedded raster textures should be loaded asynchronously. On iOS, initialize RiveModel with a Data object loaded in a background thread via URLSession or FileManager.

Timeline

Integrating a single Rive file with basic State Machine takes from 4 hours. With bidirectional synchronization between State Machine and app business logic (progress, auth states, game events), allow 1–2 days. Cost is calculated individually.