I am facing a perplexing issue with the React Native image picker in my application (IOS only). When running the app on the debug scheme, everything works flawlessly. However, upon switching to the release scheme and selecting an image using the image picker, the app crashes.
The error message I encounter is as follows:
2023-07-22 13:00:18.625 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'l.reference.file')
This issue occurs with two libraries I am using:
"react-native-image-picker": "^3.8.1"
"react-native-image-crop-picker": "^0.32.0"
I initially suspected that the libraries might be causing the problem, so I experimented by upgrading and downgrading their versions. However, even in the newer versions, the image picker fails to open the image library at all.
Here are some additional details that may be relevant:
React Native Version:
"react-native": "0.62.1"
I have invested a considerable amount of time over the past week in searching for a solution to this problem, but so far, I haven't been able to find one. I would greatly appreciate any hints or insights that can lead me to the resolution of this issue.