cordova-plugin-photo-library
cordova-plugin-photo-library copied to clipboard
App Crash in ios 13 version.
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
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
@xmarkclx your fork not working with ios13.1
@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?
@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
Oh, i only use the save image and get permissions function, we used a custom designed gallery for everything else.
On Fri, Oct 11, 2019 at 10:24 PM Rafael Muradyan [email protected] wrote:
@xmarkclx https://github.com/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
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/terikon/cordova-plugin-photo-library/issues/179?email_source=notifications&email_token=ABKEQ7HJENGSVICUTRBOSCLQOCEABA5CNFSM4I3W6DB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBAFDJI#issuecomment-541086117, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEQ7AXYBTPGQQPG6K6IITQOCEABANCNFSM4I3W6DBQ .
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
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!