sarriaroman / photoviewer

PhotoViewer Cordova Plugin
MIT License
155 stars 202 forks source link

[iOS only] Plugin only shows black screen or crashes #193

Open Galiza opened 4 years ago

Galiza commented 4 years ago

Hi, I'm using Ionic 4 (4.12.0) with the plugin versions:

"@ionic-native/photo-viewer": "^5.21.5",
"com-sarriaroman-photoviewer": "^1.2.4",

And the code is:

 public presentImage(imgSrc): void {
    this.photoViewer.show(imgSrc, '', {
      share: false,
      closeButton: true,
      copyToReference: true
    });
  }

The variable imgSrc is a base64. If I remove the options, the photoViewer opens with a black screen, but with the options it's crashing the app. But as the title states, it only happens on iOS.

facuim commented 4 years ago

Same issue at iOS only. App crashes at open the image

Galiza commented 4 years ago

@facuim As a workaround for it, I created a modal and simulated the style for the PhotoViewer. Since this will probably not be a priority for them.

ctfrancia commented 4 years ago

I'm getting the same issue. I have to follow the same workaround as @Galiza

ctfrancia commented 4 years ago

I used the InAppBrowser plugin and then had to pass a base64 image to it. I'm still investigating work arounds that will give better functionality but that's what I've come up with so far.

this.iab.create(data, '_blank', 'enableViewportScale=yes,location=no');

data is base64, that's the only way that I was able to get the iab to open an image on iOS

Boby commented 4 years ago

I tested this with ionic 4, and its not working, so for workaround created a modal ctrl and just add in image with the url into it

zvihersh commented 3 years ago

i downgraded the plugin version to 1.1.11 and it worked

ionic cordova plugin rm com-sarriaroman-photoviewer
ionic cordova plugin add com-sarriaroman-photoviewer@1.1.11
Naim-Bijapure commented 3 years ago

thanks @zvihersh

s3vdev commented 2 years ago

it dit not work.