ngageoint / geopackage-ios

GeoPackage iOS Library
http://ngageoint.github.io/geopackage-ios
MIT License
50 stars 19 forks source link

Build Failed #30

Closed sneupan3 closed 7 years ago

sneupan3 commented 7 years ago

I am relatively new to this, so please feel free to correct me if I am wrong. My project has other pods written in swift, so when I include use_frameworks! in my Podfile and install the pods, I get a build error! I tried using GeoPackage iOS Version: 1.2.1, I still get the same problem.

screen shot 2017-02-24 at 4 28 10 pm

Steps to Reproduce:

  1. Create a new xcode project
  2. run $pod init in the terminal in the project directory
  3. add "pod 'geopackage-ios', '~> 1.2.1'" in the Podfile
  4. run $ pod install

If i try to build the project(.xcworkspace) after installing the pods, there is a build error. If i remove use_frameworks! from the Podfile, it builds fine. So, I am not sure if there is some compatibility issue with proj4, but I would definitely appreciate your help!

bosborn commented 7 years ago

I was able to recreate the errors with the steps provided. At first I assumed this was because CocoaPods still did not support integrating into framework targets for Swift. But then it looked like @benasher44 fixed this in CocoaPods 1.2.0 released last month.

So the problem does appear to be in the proj4 pod. When I released geopackage-ios 1.2.0 last June I did not run into any issues. When I released 1.2.1 earlier this month I did see an error related to what you got in the release output, but was able to work around it.

I came across one of Ben's projects that is using proj4 and temporarily getting around this issue. After talking with and getting some insight from Ben, it seemed like the best immediate action was to release a new version of proj4.

I released a pod named proj4-ios version 4.9.3. I've swapped the geopackage-ios develop branch to use this version. My Swift test project was able to compile after the change. Let me know if you are able to try this out. You could fork, clone, and checkout develop. In your Podfile include it as a local project:

pod 'geopackage-ios', :path => '../geopackage-ios'

Actually just point to the develop branch in your Podfile:

pod 'geopackage-ios', :git => 'https://github.com/ngageoint/geopackage-ios.git', :branch => 'develop'

sneupan3 commented 7 years ago

Still couldn't build the project. While pointing to develop branch in podfile, I get an optput "[!] Unable to find a specification for proj4-ios (~> 4.9.3) depended upon by geopackage-ios" I also tried cloning develop and tried using it, I got the same output. pod install terminates without generating all the required files.

bosborn commented 7 years ago

It was working for me even after clearing my CocoaPods cache. Asked my co-worker to try and he saw the error you got. It looks like the pod got stuck in CocoaPods as partially deployed (not expanding). I had CocoaPods attempt to redeploy and that seemed to work. He had to update his repo and then it worked for him. The proj4-ios page can now be seen here.

Try running this and let me know:

pod repo update
pod install
sneupan3 commented 7 years ago

It seems to be working. Thank you!

bosborn commented 7 years ago

Great thanks for updating. Reopening for tracking until we release 1.2.2. Was planning to do so when GeoPackage spec version 1.2 is officially released.

bosborn commented 7 years ago

Released in 1.2.2