photoviewer icon indicating copy to clipboard operation
photoviewer copied to clipboard

[iOS only] Plugin only shows black screen or crashes

Open Galiza opened this issue 5 years ago • 8 comments

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.

Galiza avatar Feb 21 '20 12:02 Galiza

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

facuim avatar Mar 07 '20 00:03 facuim

@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.

Galiza avatar Mar 09 '20 09:03 Galiza

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

ctfrancia avatar Mar 17 '20 13:03 ctfrancia

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

ctfrancia avatar Mar 25 '20 09:03 ctfrancia

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

Boby avatar Mar 28 '20 07:03 Boby

i downgraded the plugin version to 1.1.11 and it worked

ionic cordova plugin rm com-sarriaroman-photoviewer
ionic cordova plugin add [email protected]

zvihersh avatar Jan 14 '21 11:01 zvihersh

thanks @zvihersh

Naim-Bijapure avatar Apr 11 '21 09:04 Naim-Bijapure

it dit not work.

s3vdev avatar May 06 '22 12:05 s3vdev