I trying to upgrade to react native 0.70, but I'm getting some issues with some libraries,
so I need to modify some source codes.
for example:
In this file node_modules/react-native-webengage/react-native-webengage.podspec
changing
s.source_files = 'ios/*.{h,m}'
s.dependency 'WebEngage'
s.dependency 'React-Core'
end
to
s.source_files = 'ios/*.{h,m}'
s.dependency 'WebEngage/XCFramework'
s.dependency 'React-Core'
end
what is the best approach to do it without replacing the files?
CodePudding user response:
Patch package works perfectly with React Native https://github.com/ds300/patch-package
- Follow instructions for patch-package from site above
- Change the files you need (even from the native side)
- Run
yarn patch-package react-native-webengage
- Add a patch to your git