Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreviewAnyFile.swift:271: Fatal error: Unexpectedly found nil while unwrapping an Optional value #23

Closed
Siedlerchr opened this issue Jun 8, 2021 · 2 comments · Fixed by #24

Comments

@Siedlerchr
Copy link
Contributor

I encountered this problem and after debugging I found out it happens when the url to open (myUrl) contains spaces.

Actually, the following lines can be removed because you already initialize itemUrl in the lines before.

if !FileManager.default.fileExists(atPath: itemUrl!.path) {
itemUrl = Foundation.URL(string: myUrl);
}

Siedlerchr added a commit to Siedlerchr/previewAnyFile that referenced this issue Jun 8, 2021
@Siedlerchr Siedlerchr mentioned this issue Jun 8, 2021
@mostafa-mansour1
Copy link
Owner

i merged it

@mostafa-mansour1
Copy link
Owner

npm has been updated as well https://www.npmjs.com/package/cordova-plugin-preview-any-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants