Skip to content

Commit

Permalink
Fix EXC_BAD_ACCESS crash on iOS in `[REAAnimationsManager clearShared…
Browse files Browse the repository at this point in the history
…TransitionConfigForTag:]` (#5975)

## Summary

Fixes
#5947.
Fixes
#5968.

When `react-native-reanimated` is installed but not used directly,
switching between bottom tabs from `@react-navigation/bottom-tabs` will
result in a `EXC_BAD_ACCESS` crash on iOS.

This PR adds missing mock for `_clearSharedTransitionConfigForTag` as
suggested by @bartlomiejbloniarz.

## Test plan

Try repro from
#5947 (comment)
  • Loading branch information
tomekzaw committed May 5, 2024
1 parent 81c4130 commit cea5dff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apple/LayoutReanimation/REAAnimationsManager.m
Expand Up @@ -94,6 +94,9 @@ - (instancetype)initWithUIManager:(RCTUIManager *)uiManager
_clearAnimationConfigForTag = ^(NSNumber *tag) {
// default implementation, this block will be replaced by a setter
};
_clearSharedTransitionConfigForTag = ^(NSNumber *tag) {
// default implementation, this block will be replaced by a setter
};
#ifndef NDEBUG
_checkDuplicateSharedTag = ^(REAUIView *view, NSNumber *viewTag) {
// default implementation, this block will be replaced by a setter
Expand Down

0 comments on commit cea5dff

Please sign in to comment.