react-native-image-picker icon indicating copy to clipboard operation
react-native-image-picker copied to clipboard

[🐛] undefined is not a function (near '...ImagePicker.showImagePicker...')

Open smakosh opened this issue 5 years ago • 12 comments

Description

How to repeat issue and example

  • npx react-native init
  • Install and use this library

Additional Information

  • Image Picker version: 3.0.1
  • React Native version: 0.63.4
  • Platform: iOS
  • Development Operating System: MacOS, BigSur

smakosh avatar Dec 12 '20 02:12 smakosh

Screenshot_20201211-181455.png

Same on Android

pixel 2

smakosh avatar Dec 12 '20 02:12 smakosh

import {launchImageLibrary} from 'react-native-image-picker' fixed it

smakosh avatar Dec 12 '20 02:12 smakosh

@smakosh , @pedro , @ligaz , @nevir , @jkappers as ImagePicker.showImagePicker is not working then how can i get option for either select image from gallery or camera.

BiplovQss avatar Jan 14 '21 16:01 BiplovQss

There are now 2 exported functions that you can import, one to get images from the library and the other to launch the camera.

smakosh avatar Jan 14 '21 17:01 smakosh

Need both image option at a time. any option for that @smakosh .

BiplovQss avatar Jan 17 '21 15:01 BiplovQss

same on Android

redko-o avatar Mar 25 '21 10:03 redko-o

Still there is no solution on this issue? I also want to select both option - library & launch camera. How to fix this issue?

SatalBill avatar Mar 29 '21 01:03 SatalBill

Is there a way to get both options, library and launch camera?

eddievlagea avatar Apr 05 '21 08:04 eddievlagea

I think you need to downgrade to version 2.3.4 to get this option

nasiefk avatar Apr 21 '21 09:04 nasiefk

you can use react-native-options-menu to build your own menu to show both options.

vasuchawla avatar May 10 '21 06:05 vasuchawla

import {launchImageLibrary} from 'react-native-image-picker' fixed it

Really strange solution but works for me too. It would be nice for someone to take a look at why this is.

3DJakob avatar Jun 06 '21 15:06 3DJakob

Follow this solution: https://stackoverflow.com/a/68378454/7921804

Maijied avatar Jul 14 '21 12:07 Maijied