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

App Crash in ios 13 version. #179

Open
priyasamyal opened this issue Sep 30, 2019 · 8 comments
Open

App Crash in ios 13 version. #179

priyasamyal opened this issue Sep 30, 2019 · 8 comments

Comments

@priyasamyal
Copy link

Following are the logs generated in iOS version 13. Works fine in previous pervious. Please update ASAP.
Unexpectedly found nil while unwrapping an Optional value: file /Volumes/Data/Projects/Destinate/destinate/platforms/ios/destinate/Plugins/cordova-plugin-photo-library/PhotoLibraryService.swift, line 317
2019-09-30 12:36:26.209539+0530 destinate[503:147761] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Volumes/Data/Projects/Destinate/destinate/platforms/ios/destinate/Plugins/cordova-plugin-photo-library/PhotoLibraryService.swift, line 317

@xmarkclx
Copy link
Contributor

I'm using my fork with iOS 13.
There are instructions to use it as a replacement for this one if you are interested:

https://github.com/xmarkclx/cordova-plugin-photo-library-sism

@rafaelmrdyn
Copy link

@xmarkclx your fork not working with ios13.1

@xmarkclx
Copy link
Contributor

@xmarkclx your fork not working with ios13.1

That's really odd, I was just testing it yesterday, and am in fact using it right now on an iOS 13 iPhone and iPadOS 13 iPad Pro.

Are you sure you removed the original photo library?

What error are you getting?

@rafaelmrdyn
Copy link

@xmarkclx your fork not working with ios13.1

That's really odd, I was just testing it yesterday, and am in fact using it right now on an iOS 13 iPhone and iPadOS 13 iPad Pro.

Are you sure you removed the original photo library?

What error are you getting?

yes i'm sure i removed original library and use yours, and there are no errors but plugin does not getting images anyway

@xmarkclx
Copy link
Contributor

xmarkclx commented Oct 11, 2019 via email

@rafaelmrdyn
Copy link

i solve this issue by replacing

let file_url:URL = info!["PHImageFileURLKey"] as! URL
completion(file_url.relativePath, libraryItem)

to

let file_url:NSString = (info![“PHImageFileUTIKey”] as? NSString)!
completion(file_url as String, libraryItem)

in the 314 line of PhotoLibraryService.swift file

PHImageFileURLKey deprecated in ios 13, instead use PHImageFileUTIKey

@xmarkclx
Copy link
Contributor

xmarkclx commented Oct 14, 2019

@iamrafo Ok, added that fix on [email protected].

Thanks.

@abcoskn
Copy link

abcoskn commented Oct 17, 2021

i solve this issue by replacing

let file_url:URL = info!["PHImageFileURLKey"] as! URL completion(file_url.relativePath, libraryItem) to

let file_url:NSString = (info![“PHImageFileUTIKey”] as? NSString)! completion(file_url as String, libraryItem)

in the 314 line of PhotoLibraryService.swift file

PHImageFileURLKey deprecated in ios 13, instead use PHImageFileUTIKey

You saved my day, thank you!

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

No branches or pull requests

4 participants