Closed parvez-keeptruckin closed 9 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.)
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.
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.
@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?
Package.resolved
to application target as perinstructions. Besides this I have SDWebImage
added via SPM but rest of the libraries are via CocoaPods. When I open AcknowListViewController()
in the app, it is only showing AcknowList
and SDWebImage
. When I click on any of these items in the list then it is opening the respective Github page instead of the License. Also I do not see any item related to CocoaPods libraries. I initialised the view controller simply as AcknowListViewController()
. I am using Xcode 15.0. Am I missing any step here ?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.
Does it makes sense to show the repo page in case of swift packages? For private repo providing swift package where it will navigate ?
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.
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.