PhotoViewer plugin only shows black screen or crashes on iOS

734 Views Asked by At

I'm using Ionic 4 (4.12.0) with the PhotoViewer 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.

1

There are 1 best solutions below

2
Khanh Le Tran On

after read the document, base64 is just supported on android. So it is what the problem. (1.1.4) Base64 Support on Android