cordova-plugin-photo-library icon indicating copy to clipboard operation
cordova-plugin-photo-library copied to clipboard

Please release a new version to fix rangeAt in swift4

Open vitorbarros opened this issue 5 years ago • 12 comments

Hello.

I am getting the deprecation error for rangeAt function in swift 4. I see that in the master it was already fixed, please release a new version to fix it.

vitorbarros avatar Apr 20 '19 22:04 vitorbarros

+1 Facing the same problem

baltejsingh88 avatar Apr 21 '19 12:04 baltejsingh88

(at:0)

wennjie avatar Apr 23 '19 05:04 wennjie

I think this plugin is dead! Anyone answer an issue

vitorbarros avatar May 01 '19 01:05 vitorbarros

@vitorbarros Maybe you try this out. https://github.com/terikon/cordova-plugin-photo-library/issues/163#issuecomment-485805403

baltejsingh88 avatar May 01 '19 02:05 baltejsingh88

It looks like this has been fix has been made in master, but has not been published as a release. Can we get a release made?

cabaird avatar May 07 '19 17:05 cabaird

There are several points to correct for Swift 5. I tried on my project and that's ok. Is it possible to integrate them and publish a new version?

Here are the list of the replacements : Line 308 : (imageData: Data?, dataUTI: String?, orientation: UIImage.Orientation, info: [AnyHashable: Any]?) in

Line 450 : (imageData: Data?, dataUTI: String?, orientation: UIImage.Orientation, info: [AnyHashable: Any]?) in

Line 482 : (imageData: Data?, dataUTI: String?, orientation: UIImage.Orientation, info: [AnyHashable: Any]?) in

Line 587 : (imageData: Data?, dataUTI: String?, orientation: UIImageOrientation, info: [AnyHashable: Any]?) in

Line 761 : range: NSMakeRange(0, url.count)) else { // TODO: firstMatchInString seems to be slow for unknown

Line 823 : data = image.jpegData(compressionQuality: CGFloat(quality))

Line 826 : data = image.jpegData(compressionQuality: CGFloat(quality))

gwenael-louandre avatar May 09 '19 12:05 gwenael-louandre

+1 to this

itemir avatar May 20 '19 05:05 itemir

+1

5heri avatar May 20 '19 22:05 5heri

Anyone have solution for this issue?

stenionobresem avatar May 27 '19 12:05 stenionobresem

Is anyone still working on this project? Can we get a solution. Our workaround to install from the master branch just broke builds this morning as there was a commit to master in the forked repo that broke compatibility. This issue would have been much easier to find and fix if I were installing this at a released version, rather than directly from that repo.

cabaird avatar Jun 12 '19 17:06 cabaird

👍

muhammaddadu avatar Jun 12 '19 22:06 muhammaddadu

this worked for me:

https://github.com/terikon/cordova-plugin-photo-library/issues/163#issuecomment-485805403

I manually deleted the existing plugins and reinstalled from his fork

davidseek avatar Jun 21 '19 21:06 davidseek