Ionic Native Camera select Video on iOS not working


#1

I’m developing a App with Ionic 2 and I’m have problems with @ionic-native/Camera. I’ve this code on Upload.ts.

let loader = this.loading.create({
  content: 'Carregando video....'
});
loader.present().then(() => {
  const options: CameraOptions = {
    quality: 100,
    destinationType: this.camera.DestinationType.FILE_URI,
    sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
    mediaType: this.camera.MediaType.VIDEO,
  }
  this.camera.getPicture(options).then((videoData) => {
      this.uploadForm.controls['file'].setValue(videoData)
      loader.dismiss();
    }, (err) => {
      console.log(err);
  });
});

This code works fine in Android, but when I run ionic cordova run ios -lc, the promise this.camera.getPicture(options) is never resolved, so the loader keep running forever.

Thanks in advance!