SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

Any chance to publish this as a pod? #102

Closed mkoorn closed 3 years ago

mkoorn commented 3 years ago

I would like to use this project in my development pod. I don’t believe this is currently possible. (If anyone knows a way to do this, please let me know.)

Is there a chance that you could publish a podspec for the project? Copying the whole source to my project doesn’t feel as good practice.

thanks, Michiel

defagos commented 3 years ago

Hi Michiel,

Sorry, no CocoaPods support is planned. We supported CocoaPods for years and then Carthage. All these solutions had their own respective issues, especially with all the changes Apple introduced in recent years (Catalyst, M1, XCFrameworks). With every major Xcode release we had work to do to support new changes or fix build issues, with sometimes having to wait for CocoaPods or Carthage to deliver an update of their own toolset.

Now that Swift Package Manager (SPM) is mature enough we have adopted it and there is no plan to go back or offer alternative support for CocoaPods again. If we wanted to support several dependency managers we would have to make our test suite able to run with these dependency managers as well (a lot of projects supporting several dependency managers often break support for one of them somehow when releasing a new version). We are a small team and this is sadly time we don't have.

Moreover, as of today (April 26th), you will need to build and release your apps with Xcode 12. I don't know whether you wanted to use CocoaPods because you are running an old version of Xcode but, if this is the case, then you'll need to upgrade to Xcode 12 anyway, so integration with SPM is something you will be able to consider.

The only exception, of course, is if you are writing a pod which itself wants to use SRG Media Player as transitive dependency. If this is the case things get more difficult, of course, since you are mixing two dependency managers. That will simply not work, or probably using ugly tricks probably not better than embedding the source code directly (which, I agree with you, is bad practice).

If you are in this latter case and if you can afford it, I would strongly advise you to move your library project from CocoaPods to SPM, so that you can declare SRG Media Player as transitive package dependency (this is something we do and it works like a charm). Your project will be future-proof and, as said above, everyone will be able to integrate it in the future since Xcode 12 is mandatory as of today.

Hope this answers your question. Let us know if we can provide you with more help.

Best regards.

Samuel

mkoorn commented 3 years ago

Hi Samuel,

Thank you for your extensive answer. I fully understand your position. Unfortunately I will not be able to migrate to SPM in my upcoming release, so I need to find a temporary solution.

thanks again. regards, Michiel