photoviewer: Exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance
Hello,
I’m trying to open an image, that is located under an https:// URL.
XCode Error Screenshot:

Ionic Code:
const fullImageURL = 'https://burningparrot.com/assets/logo_v3.png';
console.log('OPENING FILE', fullImageURL);
if (this.platform.is('cordova')) {
const options = {
share: true, // default is false
closeButton: true, // default is true
copyToReference: true // default is false
};
this.photoViewer.show(fullImageURL, '', options);
}
Dependency versions:
"@ionic-native/photo-viewer": "^4.20.0"
"com-sarriaroman-photoviewer": "^1.2.1"
"cordova-ios": "5.0.0"
"ionic-angular": "3.9.2"
Am I doing something wrong? How can I fix this error?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 15 (4 by maintainers)
Hello @tobiasmuecksch, I have looked at the code, and it looks like all the parameters in the ‘options’ variable are required. If you don’t add them, it will trigger an exception.
Please see the following: https://github.com/sarriaroman/photoviewer/blob/3fe843a9000fa19215530b44c214456acff415b4/www/PhotoViewer.js#L24