react-native-reanimated: Shared Element Transitions not working for iOS when adding use_frameworks inside Podfile.
Description
On adding the line
use_frameworks! :linkage => :static inside Podfile
shared transitions stop working in the iOS build.
My main project has a dependency on rnfirebase. As stated in its documentation here, it requires CocoaPods to use frameworks.
The shared transition animation stops working when adding the use_frameworks line and rebuilding the project. After opting out of the use frameworks usage and rebuilding the project fixes this issue, but rnfirebase stops working. Need help in getting both rnfirebase and shared elements transitions to work together.
In the minimal repo inside App.tsx I am calling ManyScreensExample to test the transition.
Steps to reproduce
In main branch inside podfile
- Added line
use_frameworks! :linkage => :static - Commented line
:flipper_configuration => flipper_config,
A stable version can be found in the branch stable/shared
- Commented line
use_frameworks! :linkage => :static - Uncommented line
:flipper_configuration => flipper_config,
Snack or a link to a repository
https://github.com/jerinjohnk/reanimatedTest/tree/main
Reanimated version
3.1.0
React Native version
0.71.7
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 14 Pro
Acknowledgements
Yes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 15 (1 by maintainers)
For me it seems like Expo 50 broke the transition, it used to work fine on 49. And it still works on Android!
Any idea how to fix it when using Expo Dev Client?
Issue persists – please reopen
Try adding this to the Podfile
This issue is still persistent, this issue should be reopened
@TowhidKashem & @julian-gargicevich Sorry for the late reply. Here’s my podfile for which it had worked.
Hope that helps.
@TowhidKashem put it in your target ‘AppFoo’. near post_install
It should work usually. We build RNScreens as static_library it is the default behavior when you don’t use use_frameworks. You can see related issues in these libraries react-native-screens, flipper, react-native-permissions
Thanks @zhenkaGo adding these lines did fix the issue. It won’t introduce any breaking change in reanimated or react-native-screens, right?