ImagePicker (ionic native) plugin not found

I am trying to use the ImagePicker plugin in an Ionic 2 project.

I have followed the instructions on https://github.com/wymsee/cordova-imagePicker.

I have also installed phonegap typings (dt~phonegap).

When I try to run the app I get the message that the plugin is not installed.

  • Ionic 2 beta 32
  • Cordova 6.2.0

cordova-plugin-camera 2.2.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-image-picker 1.1.1 "ImagePicker"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 “Keyboard”

In my code window.imagePicker is undefined. “ImagePicker” itself can be used.
The Camera plugin is working as expected.

Can you provide the code you’re using to call the plugin?

Also few things to check:

  • Are you waiting for ondeviceready or platform.ready() ?
  • Are you running on device/emulator?

Yes. I try it after the “platform ready”.

import {Camera, ImagePicker} from 'ionic-native';

and

ImagePicker.getPictures({
          maximumImagesCount: 2,
          width: 300,
          height: 300,
          quality: 75
})

It keeps telling me that the plugin is not installed.

This is working:

Camera.getPicture({
            quality : 75,
            destinationType : Camera.DestinationType.DATA_URL,
            sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
            allowEdit : true,
            encodingType: Camera.EncodingType.JPEG,
            targetWidth: 300,
            targetHeight: 300,
            saveToPhotoAlbum: false,
})

But as far as I know it only allows me to select 1 image at a time, while the ImagePicker would allow me to select multiple images.

Running with Ionic View on an iPad / thru Xcode. No difference.

Ok… It seems Ionic View is does not support the ImagePicker.

It is working in the iOS emulator.