vtourraine / AcknowList

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

Exclude a pod #107

Closed iadcialim closed 1 year ago

iadcialim commented 1 year ago

Hi. How do exclude a pod and not show up in the Pods-acknowledgements.plist?

vtourraine commented 1 year ago

Hello 👋

You can let the view controller automatically imports all the pods from the plist file, then remove an item from the acknowledgements property before presenting the controller.

Like this:

let viewController = AcknowListViewController()
if let index = viewController.acknowledgements.firstIndex(where: { $0.title == "PodABC" }) {
    viewController.acknowledgements.remove(at: index)
}
navigationController?.pushViewController(viewController, animated: true)
iadcialim commented 1 year ago

thanks @vtourraine. it worked!