Closed ilyakuteev closed 1 year ago
I agree that it’s currently suboptimal for multiple bundles, something better is needed. I use a similar workaround for data.
For safer and shorter code when initializing from data, I just cast the data.
let data = Data(whatever)
let riveFile = RiveFile(byteArray: [UInt8](data))
Was implemented here: https://github.com/rive-app/rive-ios/pull/250
Problem
By now
RiveFile+Extensions.swift
does not support user-defined modules. This results in boilerplate code when using Rive animations from SPM projects with a single bundle for each target/module.Consider the following example: Repo layout:
Code inside
A.swift
:Proposal
Add bundle parameter to
RiveFile.init(name:extension:)
, like this: