Closed wenjianli92 closed 5 years ago
Display the above error in xcode
hi @wenjianli92, thanks for raising this issue. There was some worked that was merged in recently that seems to be causing a lot of problems now. I forgot it was there when I published the patched version. I'm going to remove it from the master branch for now and release a new patch version today.
patch 2.1.4 has been released which fixes this crash. 2.1.2 has been deprecated. Can you try updating to the latest to check the issue has been fixed for you?
Thank you for your efforts, now I am going to update to 2.1.4 to try
@shnist Still can't, reported the following error
hi @wenjianli92, interesting. I could reproduce the crash in 2.0.12, but it was fixed for me in 2.0.14. Can you show me the output of cordova info
and a code snippet from your application if able?
hi @shnist, Sorry, I stopped this job for some reason ,I use ionic ,Ionic information is as follows:
I am using a third-party plugin to do the function of sending and receiving files in a chat session, and using one of its APIs to perform the download. After the download is successful, it will return a path(“this.fileurl” in the code below).
console.log(this.fileurl,mymimetype,'=====================fileurl,mymimetype,63'); await this.fileOpener.open(this.fileurl,mymimetype);
The xcode output is as follows:
The file path starts with '/var/mobile'. Is this wrong? Then how can I get the correct file path?
This problem is caused by the wrong path:
let localentry: Entry = await this.file.resolveLocalFilesystemUrl('file://'+this.fileurl); let fileEntry = localentry as FileEntry; fileEntry.file((myfile)=>{ if(this.nativeService.isIos()){ this.fileOpener.open(localentry.nativeURL,myfile.type); } },(err)=>{ console.error(err); });
hi @wenjianli92, glad to hear you were able to resolve your issue.
I am using the latest 2.1.2 version I use ionic, ionic info:
App crashes when opening a file using the open method, at iphone 6 plus and ipad ios:12.1
![Uploading image.png…]()