Reputation: 156
I am cureently trying to save a png image from my ionic(v1) application.This works well in android but I have errors in iOS.
The error is
ERROR: Wrong type for parameter "uri" of resolveLocalFileSystemURI: Expected String, but got Null.
I am using the cordova file plugin . I am sensing something is wrong with the folder path.
var folderpath=cordova.file.applicationStorageDirectory;
Thanks
Upvotes: 4
Views: 5379
Reputation: 637
If anyone stumbles upon this question these days... The path is null when there is no user permission. Make sure you acquired correct permissions before trying.
Upvotes: 0
Reputation: 195
Just use cordova.file.dataDirectory
.
I stored pdf's using this and it is working fine. Good luck!
Upvotes: 1
Reputation: 516
You might be able to fix this issue by deleting your platforms folder, or the files inside, and do a 'platform add' afterwards.
Steps to reproduce:
Following the steps above fixed the issue for me :).
Upvotes: 0