259 Commits

Author SHA1 Message Date
dskuza
5728903929 Updating version files 2026-01-13 14:09:38 +00:00
bodymovin
3557439325 Updating version files 2025-12-03 17:55:25 +00:00
dskuza
619f4bce6f Updating version files 2025-11-10 14:26:39 +00:00
dskuza
32d80c0f25 Updating version files 2025-11-04 04:30:39 +00:00
dskuza
614c654b0d Updating version files 2025-10-09 15:48:57 +00:00
dskuza
2ae370d540 feat(apple): add multitouch support (#10714) 95ce5b46ae
* feat(apple): add multitouch support

* refactor(apple): always send pointer exit after up

Co-authored-by: David Skuza <david@rive.app>
2025-10-08 00:08:31 +00:00
bodymovin
32c3dd1516 data bind artboards rcp file (#10214) c542b9b7ac
* make file ref counted

* migrate File to refcnt

* add bindable artboard class to keep file reference

* feat(unity): support rcp file and BindableArtboard class (#10228)

* refactor(apple): use updated file bindable artboard apis (#10229)

* update command queue to support bindable artboards

* use bindable artboards on command queue

* self manage view model instances in js runtime

* change remaining viewModelInstanceRuntimes to rcp

* refactor(apple): update view model instances to use rcp (#10298)

* refactor(unity): support rcp ViewModelInstanceRuntime (#10309)

* rebase fix

* deprecate getArtboard in favor of getBindableArtboard

* fix merge

* remove unused lambda capture

* fix rive binding

* feat(Android): RCP File, VMI, and add bindable artboards (#10456)

* refactor: C++ refactors

- Import from long (incorrect) -> jlong
- Header clang-tidy fix
- Use reinterpret_cast instead of C-style cast
- Break out some variables instead of long one liners
- Use auto
- Remove unused env and thisObj

# Conflicts:
#	packages/runtime_android/kotlin/src/main/cpp/src/helpers/general.cpp

* docs: Improve documentation on the File class

* feat: Support bindable artboard type and RCP VMIs

# Conflicts:
#	packages/runtime_android/kotlin/src/androidTest/java/app/rive/runtime/kotlin/core/RiveDataBindingTest.kt

* feat: Support RCP files

* refactor: Change from +1/-1 ref to just release

* fix: Moved to the more appropriate null pointer for GetStringUTFChars

* replace unref with release

Co-authored-by: Adam <67035612+damzobridge@users.noreply.github.com>
Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Erik <erik@rive.app>
Co-authored-by: hernan <hernan@rive.app>
2025-09-30 00:08:45 +00:00
dskuza
49914377c7 Updating version files 2025-09-12 03:26:08 +00:00
dskuza
099f8bcf3d fix(apple): update listeners on list instance changes (#10469) 8ce5e60a6d
Co-authored-by: David Skuza <david@rive.app>
2025-09-10 14:30:21 +00:00
bodymovin
cf15ccec07 feature: add auto generated state machine on artboard initialization (#10420) 6c147cb33f
* feature: add auto generated state machine on artboard initialization

Co-authored-by: hernan <hernan@rive.app>
2025-08-28 19:55:08 +00:00
dskuza
e9e467a789 Updating version files 2025-08-28 17:06:17 +00:00
dskuza
a62b9459d2 Updating version files 2025-08-13 16:27:12 +00:00
dskuza
ffe2485289 Updating version files 2025-07-31 15:50:02 +00:00
dskuza
f1d17d1c46 feat(apple): allow supplying nil bindable artboard (#10262) a265fa81ca
Co-authored-by: David Skuza <david@rive.app>
2025-07-30 15:05:09 +00:00
dskuza
c8b7cbc649 Updating version files 2025-07-15 17:37:08 +00:00
dskuza
cd07875eb7 feat(apple): add support for data binding artboards (#10131) b4ce2d25fd
Co-authored-by: David Skuza <david@rive.app>
2025-07-15 16:02:52 +00:00
dskuza
401fd21555 Updating version files 2025-07-09 17:25:52 +00:00
dskuza
aadb3d3d52 feat(apple): add support for data binding list properties (#9936) d2997eeef4
Co-authored-by: David Skuza <david@rive.app>
2025-07-08 20:13:34 +00:00
dskuza
30239d8161 Updating version files 2025-07-01 22:53:39 +00:00
dskuza
c890b43d31 feat(apple): skip drawing if view is offscreen (#10077) 0dee98781d
Co-authored-by: David Skuza <david@rive.app>
2025-07-01 18:00:14 +00:00
dskuza
5e4c679ce9 Updating version files 2025-06-05 17:50:03 +00:00
dskuza
61a4f7ef98 Updating version files 2025-06-04 17:47:46 +00:00
dskuza
f0000132fe feat(ios): add support for data binding images (#9664) 8f30ede7be
Co-authored-by: David Skuza <david@rive.app>
2025-06-04 15:23:01 +00:00
dskuza
d85f1ea298 Updating version files 2025-05-30 14:08:09 +00:00
dskuza
54304d2b36 Updating version files 2025-05-29 16:56:26 +00:00
dskuza
7aa9afaf79 refactor(apple): use new render context per file and view (#9838) 9c7927622b
Co-authored-by: David Skuza <david@rive.app>
2025-05-29 16:14:01 +00:00
dskuza
a946d5d480 Updating version files 2025-05-28 16:43:05 +00:00
dskuza
8ea6709a0b Updating version files 2025-05-12 20:21:22 +00:00
dskuza
f4a344869a Updating version files 2025-04-23 13:30:06 +00:00
dskuza
5dd670b893 feat(ios): add data binding replace view model instance support
## Changes
- Adds support for replacing view model instance properties with other view model instances

## Fixes
- Fixes an issue where nested view model instances and properties were getting incorrectly created and cached

Diffs=
909ae012c1 feat(ios): add data binding replace view model instance support (#9500)

Co-authored-by: David Skuza <david@rive.app>
2025-04-22 20:45:12 +00:00
dskuza
94b931d3b5 Updating version files 2025-04-16 02:15:43 +00:00
dskuza
4110f9f3f6 feat(ios): add support for data binding
Adds support for data binding to the iOS runtime.

## Changes

### RiveFile

Updated to match c++ runtime support for getting view models by index, name, and default for an artboard.

### RiveArtboard

Updated to match c++ runtime support for binding a view model instance.

### RiveStateMachine

Updated to match c++ runtime support for binding a view model instance. Additionally, this holds a strong reference to the view model instance that is currently bound (which aids in knowing which state machine should have its property listeners called after advance).

### RiveModel

Adds support for enabling / disabling autoBind functionality. This has to be done _after_ initialization, since Swift default arguments don't bridge to ObjC, and I didn't want to add n number of new initializers. When enabled, a callback will be called with the bound instance.

## New Types

Currently, type names are similar to those found within the c++ runtime. They're kind of ugly when it comes to ObjC, but the Swift names are cleaned up (e.g `RiveViewModelRuntime.Instance` instead of `RiveViewModelInstanceRuntime`).

### RiveDataBindingViewModel

The bridging type between the c++ runtime equivalent (`rive::ViewModelRuntime`) and ObjC.

### RiveDataBindingViewModelInstance

Swift: `RiveDataBindingViewModel.Instance`

The bridging type between the c++ runtime equivalent (`rive::ViewModelInstanceRuntime`) and ObjC.

### RiveDataBindingViewModelInstanceProperty

Swift: `RiveDataBindingViewModel.Instance.Property`

The superclass bridging type between the c++ runtime equivalent (`rive::ViewModelInstanceValueRuntime`) and ObjC.

### Subclasses

- Strings: `RiveDataBindingViewModelInstanceStringProperty`
  - Swift: `RiveDataBindingViewModel.Instance.StringProperty`
- Numbers: `RiveDataBindingViewModelInstanceNumberProperty`
  -  Swift: `RiveDataBindingViewModel.Instance.NumberProperty`
- Boolean: `RiveDataBindingViewModelInstanceBooleanProperty`
  - Swift: `RiveDataBindingViewModel.Instance.BooleanProperty`
- Color: `RiveDataBindingViewModelInstanceColorProperty`
  - Swift: `RiveDataBindingViewModel.Instance.ColorProperty`
- Enum: `RiveDataBindingViewModelInstanceEnumProperty`
  -  Swift: `RiveDataBindingViewModel.Instance.EnumProperty`
- Trigger: `RiveDataBindingViewModelInstanceTriggerProperty`
  - Swift: `RiveDataBindingViewModel.Instance.TriggerProperty`

### Observability

KVO has (temporarily) been disabled, "forcing" observability to be done through the explicit `addListener` and `removeListener` functions of each property type. `removeListener` exists on the superclass, however the matching `addListener` functions exist on each property type, primarily due to the fact that there is no "pretty" way of handing these functions as generics (where only the value type of the property differs for each callback) other than utilizing `id`. Listeners exist within the context of a property; however, an instance will use its (cached) properties to request that it calls its listeners.

## Details

### Caching properties

When a property getter is called on a view model instance, a cache is first checked for the property, otherwise a new one is returned and cached. This helps with ensuring we are using the same pointer under-the-hood. This isn't strictly necessary (per testing) but does allow for some niceties, such as not having to explicitly maintain a strong reference to a property if you want to just observe: `instance.triggerProperty(from: "...").addListener { ... }`.

Properties are cached for the first component when parsing the path for the property. In the instance that a path with > 1 component  is provided to a property (e.g `instance.triggerProperty(from: 'nested/trigger")`, then the appropriate nested view models are created, and the property is associated with the correct view model (e.g above, the view model `nested will be cached, and the trigger property will be cached within that view model).

### Caching nested view models

Similar to caching properties, when a (nested) view model getter is called on a view model instance, a cache is first checked for the view model, otherwise a new one is returned and cached. This helps ensure that when (re)binding an instance to a (new) state machine or artboard, that all properties within that view model still have its listeners attached, regardless of how nested a path goes. This will likely help with implementing replacing instance functionality in v2.

## Testing

Unit tests have been added for data binding, attempting to capture high-level expectations rather than totally verifying the c++ runtime expectations. This includes things like: all getters returning object-or-nil, listeners being called with the correct values, autoBinding, property and view model caching, etc. The `.riv` file for unit tests is the same one that is used within the Example app.

## Example

A new `.riv` file has been added that shows basic usage of each property type (including observability). The same `.riv` file is used in the unit tests.

Diffs=
b2f1db73d7 feat(ios): add support for data binding (#9227)

Co-authored-by: David Skuza <david@rive.app>
2025-04-15 21:45:39 +00:00
dskuza
c2b8b45da7 Updating version files 2025-04-11 17:13:11 +00:00
HayesGordon
45f3a30ce2 Updating version files 2025-04-03 12:58:12 +00:00
bodymovin
1c193ad4f0 Updating version files 2025-03-24 16:34:58 +00:00
bodymovin
7c3e8ffd1c Updating version files 2025-02-28 00:33:44 +00:00
dskuza
892a393d12 Updating version files 2025-02-24 16:20:41 +00:00
dskuza
9cb1022294 Updating version files 2025-02-19 15:42:22 +00:00
bodymovin
73190ef6bd Updating version files 2025-02-15 00:01:08 +00:00
dskuza
93cbe0c833 Updating version files 2025-02-12 15:50:15 +00:00
dskuza
4aeeecf424 Updating version files 2025-02-11 18:40:16 +00:00
bodymovin
04ff10dfa5 Updating version files 2025-02-11 15:19:27 +00:00
dskuza
ae975ac517 Updating version files 2025-01-23 16:16:48 +00:00
bodymovin
7a56dcb04a Updating version files 2025-01-14 00:57:17 +00:00
dskuza
20bb89e2d3 Updating version files 2025-01-08 17:46:49 +00:00
dskuza
43da44a77b Updating version files 2025-01-07 16:07:50 +00:00
dskuza
694d9b74d7 Updating version files 2024-12-23 16:03:45 +00:00
dskuza
aaa2040adc Updating version files 2024-12-19 16:25:11 +00:00
dskuza
1b5de5fbba Force advancing on iOS if advancing by 0
Similar to Android: https://github.com/rive-app/rive/pull/8725

With changes from Option C, the C++ runtime will report that an animation should not continue if advancing by 0. This causes the iOS advance logic to break, and if stopping / pausing and then playing, the advance by 0 will continually return false, not allowing an animation to play again.

Diffs=
d527114521 Force advancing on iOS if advancing by 0 (#8766)

Co-authored-by: David Skuza <david@rive.app>
2024-12-19 15:09:27 +00:00
bodymovin
234076f469 Updating version files 2024-12-17 19:23:30 +00:00