progress-view
progress-view copied to clipboard
Fabric support
This pull request resolves https://github.com/react-native-progress-view/progress-view/issues/91
Description
Support for Fabric in iOS and Android.
JS changes
- Add codegenConfig in package.json
- Move
requireNativeComponentto separate file and migrate tocodegenNativeComponent - Split the type into 3 files RNCProgressViewNativeComponentAndroid (for Android), RNCProgressViewNativeComponent (for iOS, macOS), RNCProgressViewNativeComponentWindows (for Windows) since the types is slightly difference.
Cpp changes
- Add new
common/cpp - Only use by iOS
Why?
iOS supports setting an image as a background of progress. It's a bit tricky to add, but I follow the solution from https://github.com/reactwg/react-native-new-architecture/discussions/31#discussioncomment-3072215 which requires implementing image loading in c++ layer. Another solution is https://github.com/reactwg/react-native-new-architecture/discussions/31#discussioncomment-2717047 which looks cleaner and won't impact Android but it have to import RCTBridge+Private.h so I choose to implement c++ instead, can let me know which one you prefer.
iOS changes
- Update podspec
- iOS Implementation for fabric support
- Support auto link
Android Changes
- Update gradle files
- Android Implementation for fabric support
- Maintain backward compatibility using
RNCProgressViewManagerImpl - Support auto link
Breaking change: It should support both old architecture and new architecture. But requires bumping minimum RN version and minimum iOS version
- Fabric -> RN version >= 0.70
- Old architecture -> RN version >= 0.65 and minimal iOS version to 11.0
Affected platforms
- [x] Android
- [x] iOS
- [ ] Windows
- [ ] MacOS
Test plan/screenshots/videos
I created fabric-example/ for testing out fabric using RN 0.70 (+ react-native-test-app).
Paper
| iOS | Android |
|---|---|
![]() |
![]() |
Fabric
| iOS | Android |
|---|---|
![]() |
![]() |



