launchImageLibrary not working on iPhone emulator
See original GitHub issuereact-native-cli: 2.0.1 react-native: 0.40.0 “react-native-image-picker”: “^0.25.1”,
It works fine on Android, but when I run it in the iOS emulator or physical iphone device I get this error:
undefined is not a function (evaluating ‘_reactNativeImagePicker2.default.launchImageLibrary(options, function(response){ })’)
Here is the stripped down version of my source code:
import ImagePicker from 'react-native-image-picker';
class EditListing extends Component {
pickImage(imageType){
let options = {
mediaType: 'photo',
quality: 1,
maxWidth: 144,
maxHeight: 144
}
ImagePicker.launchImageLibrary(options, (response) => {
...
});
}
...
}
The only thing different I can think of is that when I linked the binary with the library, I could only find “libRNImagePicker.a” (instead of “RNImagePicker.a” like the documentation states.)
Issue Analytics
- State:
- Created 7 years ago
- Comments:10
Top Results From Across the Web
launchImageLibrary not working on iPhone emulator #449
I am using react-native-firebase-starter and I added react-native-image-picker, it did not work, however when I did it manually according to the ...
Read more >Xcode Simulator m1 - can't pick im… | Apple Developer Forums
Hi, can anybody confirm that there are a problem with the image picker on Xcode 12.4 / Sim 12.4 on the new apple...
Read more >Image Picker not working in React Native app, why?
Updated with new input: your ImagePicker object do not have launchImageLibrary nor launchCamera . There is a problem with you installation .
Read more >Running On Simulator - React Native
Once you have your React Native project initialized, you can run npx react-native run-ios inside the newly created project directory. If ...
Read more >react-native-image-picker - npm
A React Native module that allows you to use native UI to select media from the device library or directly from the camera....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
install it manually, do not use auto link command line
No problem @cosydney. In the readme file, refer to the manual iOS installation instructions. It talks about manually linking up libraries in your Xcode project. I undid all of that and then walked through the steps again and it worked that time. I must have just done it wrong the first time.