Coder Social home page Coder Social logo

Build using Carthage? about geoswift HOT 14 CLOSED

geoswift avatar geoswift commented on May 23, 2024 2
Build using Carthage?

from geoswift.

Comments (14)

macdrevx avatar macdrevx commented on May 23, 2024 2

#153

from geoswift.

madhavajay avatar madhavajay commented on May 23, 2024 1

@macdrevx and I have solved the issue. For anyone who wants to know what we did. I created an xcode project for the https://github.com/GEOSwift/geos dependency which allows a nested Carthage dependency in GEOSwift.

There was a hacky way to then get Carthage to play ball, by having a pre-script which copied the geos.framework into the expected filename for the existing Cocoapods Workspace setup.
However @macdrevx opted instead to replace Cocoapods with Carthage as the primary Dependency manager for the GEOSwift project, thus allowing Cocoapods to just be a spec for external use.

The final missing piece of the puzzle was getting the Playgrounds to work. Turns out that the playgrounds are able to find frameworks in the current Build > Product > Arch directory $BUILT_PRODUCTS_DIR so I simply copy the geos.framework from the Carthage folder into this local folder during build so that the Playground sees it.

If anyone knows a better solution I am all ears. I tried the obvious solution of nesting the Playground in the project since the Framework Search Paths are defined there and work for the framework build, but no luck.

Anyway, looks like GEOSwift is now: Cocoapods, Carthage and SPM compatible which is great news!

from geoswift.

macdrevx avatar macdrevx commented on May 23, 2024 1

This change will be released shortly…

from geoswift.

vfn avatar vfn commented on May 23, 2024

from geoswift.

davenquinn avatar davenquinn commented on May 23, 2024

Oh sorry, that's a pretty obvious step for me to take! My bad. It was kinda large so I attached below...

xcode-build.txt

from geoswift.

kylebrowning avatar kylebrowning commented on May 23, 2024

Getting this as well.

from geoswift.

kylebrowning avatar kylebrowning commented on May 23, 2024
WARNING: Unable to open project file '/Users/kylebrowning/work/ios/leagueapp/Carthage/Checkouts/GEOSwift/GEOSwift.playground' in workspace '/Users/kylebrowning/work/ios/leagueapp/Carthage/Checkouts/GEOSwift/GEOSwift.xcworkspace'.
=== BUILD TARGET GEOSwift OF PROJECT GEOSwift WITH CONFIGURATION Release ===

from geoswift.

samritchie avatar samritchie commented on May 23, 2024

Carthage is not going to work as-is on the project; as it’s building geos via a pod install step and linking via a Pods framework. Carthage builds are failing on the CocoaPods 'run script' lockfile check, but even if that was stripped out the build will fail when it attempts to link to geos.framework

The xcodeproj isn’t used at all by cocoapods (which only looks at the podspec) so it’s more common to see this set up to handle the Carthage build. However in this case, dropping CocoaPods out of the project file will impact the experience for users downloading & running the playground, and the developers who are presumably pod people.

For frameworks with dependencies, people seem to mostly use --use-submodules to add the Carthage dependencies to Carthage/Checkouts as a submodule, but to support casual users of playground it might be better committing the geos dependency in Carthage/Checkouts directly to the repo. @vfn if you have any sort of a preference here, let me know.

from geoswift.

vfn avatar vfn commented on May 23, 2024

@samritchie Would you be able to create a pull request with what you are suggesting?

Thanks!

from geoswift.

samritchie avatar samritchie commented on May 23, 2024

Can I verify if the playground should be working? I only get


error: Couldn't lookup symbols:
  __T08GEOSwift8GeometryC7crossesSbACF
  __T08GEOSwift8WaypointCMa
  __T08GEOSwift8GeometryC8disjointSbACF
  __T08GEOSwift12MultiPolygonCMa
  __T08GEOSwift8GeometryC6relateSbAC_SS7patterntF
  __T08GEOSwift8GeometryC12intersectionACSgACF
  __T08GEOSwift8GeometryC6equalsSbACF
  __T08GEOSwift8GeometryCACSgSS3WKT_tcfC
  __T08GEOSwift8GeometryCMa
  __T08GEOSwift8GeometryC6bufferACSgSd5width_tF
  __T08GEOSwift8GeometryC8containsSbACF
  __T0Sa8GEOSwiftAA7FeatureCRszlE11fromGeoJSONSayACGSg10Foundation3URLVKFZ
  __T08GEOSwift8GeometryC5unionACSgACF
  __T08GEOSwift7PolygonCMa
  __T08GEOSwift8GeometryC7touchesSbACF
  __T08GEOSwift8GeometryC10differenceACSgACF
  __T08GEOSwift8GeometryC8boundaryACSgyF
  __T08GEOSwift8GeometryC8overlapsSbACF
  __T08GEOSwift8GeometryC14pointOnSurfaceAA8WaypointCSgyF
  __T08GEOSwift8GeometryC10convexHullAA7PolygonCSgyF
  __T08GEOSwift8GeometryC6withinSbACF
  __T08GEOSwift7FeatureCMa
  __T08GEOSwift8GeometryC8centroidAA8WaypointCSgyF
  __T08GEOSwift8GeometryC10intersectsSbACF
  __T08GEOSwift8GeometryC8mapShapeSo7MKShapeCyF
  __T08GEOSwift8GeometryC8envelopeACSgyF```

from geoswift.

vfn avatar vfn commented on May 23, 2024

@samritchie it was working until Xcode 9.2, that was the last time I checked. I haven't tried it on Xcode 9.3

from geoswift.

mmarkov-appolica avatar mmarkov-appolica commented on May 23, 2024

Is there a working solution for the carthage?

from geoswift.

madhavajay avatar madhavajay commented on May 23, 2024

#145

from geoswift.

madhavajay avatar madhavajay commented on May 23, 2024

#149

from geoswift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.