Coder Social home page Coder Social logo

Comments (12)

phimage avatar phimage commented on May 18, 2024

To support Carthage

  • Have tagged version on github (or the user Cartfile will need a revision or HEAD)
  • Create an Xcode projet with shared scheme
  • Create a Cartfile with dependencies (Alamofire)

We could create the projet with swift package generate-xcodeproj

The project generated by swift package generate-xcodeproj has minimum macOS version 10.10 or it will compile only with macOS 10.12

One way to change it automatically is to create a Package.xcconfig which contains

MACOSX_DEPLOYMENT_TARGET=10.12

and launch

swift package generate-xcodeproj --xcconfig-overrides Package.xcconfig

Then the project must be commited and updated


If we do not want to commit the xcode project, user could do:

In the Cartfile

github "AvdLee/appstoreconnect-swift-sdk" "HEAD"

then get the source

carthage checkout

create the Xcode project (with macOS 12, so with Package.xcconfig)

(cd Carthage/Checkouts/appstoreconnect-swift-sdk/ && swift package generate-xcodeproj --xcconfig-overrides Package.xcconfig)

and build

carthage build

from appstoreconnect-swift-sdk.

AvdLee avatar AvdLee commented on May 18, 2024

I'm not that experienced with Carthage, but creating an Xcode project feels like a lot of overhead for only this support. The Cartfile sounds good to me with the least amount of impact. Do you agree @phimage ?

from appstoreconnect-swift-sdk.

phimage avatar phimage commented on May 18, 2024

Cartfile is like podspec but not sufficient.
It help only to download and compile a third party framework in the Carthage folder.

An Xcode projet is mandatory (until carthage want to auto create the projet maybe with SPM Carthage/Carthage#1945 )


Yes this is an overhead that's why I make this "how to" for user

But a lot of people want to do
carthage update (one step for carthage checkout carthage build), so this is just a "crappy" workaround

Then I think that carthage prefer to have one target by OS, not like SPM generate it
but I try my "how to" and it compile for all OS

from appstoreconnect-swift-sdk.

AvdLee avatar AvdLee commented on May 18, 2024

Hmm, we could also go for an Xcode project and use that as the main testing project on CI as well. We now use the CocoaPods example project, but that doesn't always work nicely together with code coverage reporting.

If you like, you can create a PR with Carthage support. Happy to review it quickly!

from appstoreconnect-swift-sdk.

ethanhuang13 avatar ethanhuang13 commented on May 18, 2024

CupertinoJWT just added Carthage support recently. From my experience, it's recommended to add version tags then Carthage can be supported easily.

However, to support user use more than one platform in a project with Carthage (say, iOS + watchOS both use appstoreconnect-swift-sdk), this SDK needs to add target per platform.

from appstoreconnect-swift-sdk.

JetForMe avatar JetForMe commented on May 18, 2024

Carthage support makes it very easy to incorporate a library, so I highly recommend it, and creating an Xcode project is entirely appropriate for this.

from appstoreconnect-swift-sdk.

github-actions avatar github-actions commented on May 18, 2024

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.

from appstoreconnect-swift-sdk.

github-actions avatar github-actions commented on May 18, 2024

This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.

from appstoreconnect-swift-sdk.

JetForMe avatar JetForMe commented on May 18, 2024

Any progress on this?

from appstoreconnect-swift-sdk.

AvdLee avatar AvdLee commented on May 18, 2024

@JetForMe as far as I know this is still open to be implemented. Feel free to open a PR to add support!

from appstoreconnect-swift-sdk.

JetForMe avatar JetForMe commented on May 18, 2024

If I knew how, I'd be happy to!

from appstoreconnect-swift-sdk.

AvdLee avatar AvdLee commented on May 18, 2024

@JetForMe It's all described here: https://github.com/Carthage/Carthage#supporting-carthage-for-your-framework

It shouldn't take a whole lot of effort. In fact, I'm somehow surprised it's not already supported. Did you run into specific errors when trying to use the framework through Carthage?

from appstoreconnect-swift-sdk.

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.