fix(ios): align ShapeAnimator TurboModules with new-arch codegen - #4269
Open
devguy22 wants to merge 1 commit into
Open
fix(ios): align ShapeAnimator TurboModules with new-arch codegen#4269devguy22 wants to merge 1 commit into
devguy22 wants to merge 1 commit into
Conversation
Match ObjC method signatures and SpecJSI types to NativeRNMBX*ShapeAnimatorModuleSpec, harden coordinate/tag bridging, and lock animator registration to avoid races with ShapeSource binding.
devguy22
requested a deployment
to
CI with Mapbox Tokens
July 31, 2026 19:47 — with
GitHub Actions
Waiting
devguy22
requested a deployment
to
CI with Mapbox Tokens
July 31, 2026 19:47 — with
GitHub Actions
Waiting
devguy22
requested a deployment
to
CI with Mapbox Tokens
July 31, 2026 19:47 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes ShapeAnimator TurboModules on iOS New Architecture so
MovePointShapeAnimator/ChangeLineOffsetsShapeAnimatoractually bind and animate.I have this working for my app using an npm patch package, but I'd like to see this upstreamed. Note that this code worked just fine for me before the new Arch on iOS. It also works just fine on Android with both arch.
Root causes:
NativeRNMBX*ShapeAnimatorModuleSpec(names/types), andgetTurboModulereturned the wrong SpecJSI class — so JS calls never hit the animator modules.NSNumber, andas? Doublefailed, somoveTorejected valid coordinates.ShapeSourcetag lookup, leaving sources unbound.Changes:
SpecJSItypes with codegen (NSInteger/double, correct method names).__nativeTagbridging (NSNumber+Double).ShapeSourcebinding is race-free.refresh()runs on the main thread.Verified in
/exampleon iOS New Architecture (Mapbox Maps v11) with before/after videos.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Screenshot OR Video
Before: Shape animators fail to create/bind or do not animate on New Arch iOS.
Simulator.Screen.Recording.-.iPhone.16e.-.2026-07-31.at.15.15.13.mov
After:
Animations/AnimatedPointandAnimations/AnimatedLineOffsetscreate animators, bind toShapeSource, and animate as expected.fixed_1.mov
Component to reproduce the issue you're fixing
Use the existing example scenes (no new sample committed):