Making that change “dangerously with regex” should be possible, but I am a bit confused by the “or statically via JSON” comment. The code below that shows the actual Podfile which you don’t have access to in a managed app, so I’m not sure what that part of the docs is trying to say.
If I were you I’d look into Autolinking to see how it works.
If you run expo prebuild and then do a manual npx react-native link react-native-camera (which is of course not recommended), it makes the following change to the Podfile:
diff --git ios/Podfile ios/Podfile
index c3d8c29..a92e8e2 100644
--- ios/Podfile
+++ ios/Podfile
@@ -24,6 +24,8 @@ target 'flagsecure' do
# use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
# end
+ pod 'react-native-camera', :path => '../node_modules/react-native-camera'
+
post_install do |installer|
react_native_post_install(installer)
So if you can figure out how Autolinking works, I think you ought to be able to get it to put your modified version of the above into the Podfile instead.