Geodesy icon indicating copy to clipboard operation
Geodesy copied to clipboard

Compiler errors when trying to build with Swift 5

Open olegbragin opened this issue 6 years ago • 6 comments

Hello. I use Cocoapods to install your library. Very useful, thanks! I got some issues: What I did?

  • install framework using pod Geodesy
  • tried to build with Swift 5

What went wrong?

  • I get compiler errors in Region.swift file: 'characters' is unavailable: Please use String directly

I saw that a commit which should fix exactly that, but the build for that commit has failed, so it's possible that commit was ignored and did not get into a master branch. Another options is that the .podspec version has to be also bumped again.

Really enjoying your work, but I have to manually use the files because of those errors. That would wonderful if I could just use the pod directly.

olegbragin avatar Jun 25 '19 22:06 olegbragin

Thanks for the pr. I've invited you to be a contributor.

proxpero avatar Jun 26 '19 02:06 proxpero

I've released a swift 5 version. 1.2.0 and updated the .podspec. I believe this should fix your issue. Please let me know.

proxpero avatar Jun 26 '19 02:06 proxpero

Hi Todd! Thanks for being so prominent :)

Things but worse, unfortunately. After I run pod update the versos of the pod is still 1.1.1 and more over the files Geohash.swift and Geodesy.xcconfig are missing, thus I still have my project not compilable with this pod installed.

Have you published the cocoapod? Could my pull requests be a case of such errors?

olegbragin avatar Jun 26 '19 06:06 olegbragin

Seems like compile time errors are resolved with Xcode restart and clean build. But the problem with cocoa pod version being 1.1.1 instead of 1.2.0 still remains.

olegbragin avatar Jun 26 '19 06:06 olegbragin

I ran into this problem and it appears that the 1.2.0 .podspec isn't in the Cocoapods spec repo. To get around it, I added this to my Podfile:

  pod 'Geodesy',
      :git => 'https://github.com/proxpero/Geodesy.git',
      :tag => '1.2.0'

That installed the correct version but the output from pod install still said it installed 1.1.1.

patrickmay avatar Jan 04 '20 23:01 patrickmay

Yes the podspec needs to be pushed to the cocoapods trunk repo.

Also, the .swift-version file should be updated to say 5.0

ricsantos avatar May 04 '20 00:05 ricsantos