vtourraine / AcknowList

Acknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
MIT License
784 stars 59 forks source link

Question: Does the library supports Settings bundle based display for licenses/acknowledgements for used libraries ? #110

Closed parvez-keeptruckin closed 9 months ago

parvez-keeptruckin commented 10 months ago

Similar to CocoaPods based projects wherein one can use Settings bundle to display all licenses/acknowledgements as provided and updated by CocoaPods based on additions/updates to Podfile [Link], do we support similar behaviour in AcknowList ? Here we want to show the licenses/acknowledgements in application's settings [opened via Device Settings app] and not inside the application.

vtourraine commented 10 months ago

Thank you for your question, Parvez!

If I understand correctly, the answer is no. That’s because this library was originally focused on presenting CocoaPods dependencies inside the main app, and as you pointed out, CocoaPods already generates the Settings bundle.

So I’m curious how you would use this now. To list SPM dependencies in the Settings? (SPM doesn’t support licences, so this would be a very basic list.)

parvez-keeptruckin commented 10 months ago

Apple must be aware of such things so they must provide some way of listing out dependencies similar to CocoaPods as some libraries prefers that this should be displayed.

vtourraine commented 10 months ago

Well, to my knowledge, the SPM specifications don’t include the license. A Package.swift file cannot specify the license, unlike CocoaPods’s podspec format.

parvez-keeptruckin commented 10 months ago

@vtourraine I am trying out AcknowList now. As per instructions given in the ReadMe section, I noticed few things so can you clarify on these?

vtourraine commented 10 months ago

When I click on any of these items in the list then it is opening the respective Github page instead of the License.

SPM doesn’t support licenses, so we’re showing the library repo instead. For CocoaPods dependencies, it will show the license.

Also I do not see any item related to CocoaPods libraries.

Have you added the acknowledgements plist file to your main target? If you follow the instructions here, it will try to load both the SPM and CocoaPods dependencies and merge them for display.

parvez-keeptruckin commented 10 months ago

Does it makes sense to show the repo page in case of swift packages? For private repo providing swift package where it will navigate ?

vtourraine commented 10 months ago

Does it makes sense to show the repo page in case of swift packages?

If the library has a license, it would typically be in the repo. So I think it makes sense, given the info we have.

For private repo providing swift package where it will navigate?

It would probably show a GitHub 404. For private dependencies, I would suggest either removing the acknowledgement item or editing the URL/license to put something custom. You can modify the acknowledgements property on AcknowListViewController between the init and presenting the controller.