PodsLicenseReader allows you to easily read licenses for your Cocoa Pods.
Add the following to your Podfile:
pod 'PodsLicenseReader'
Add the following to your Cartfile:
github "comyarzaheri/PodsLicenseReader" "master"
Add a reference to Pods/Target Supporting Files/Pods/Pods-<target>-acknowledgements.plist
to your project and make sure the file is listed in Copy Bundle Resources
under Build Phases
in your project settings.
import PodsLicenseReader
for license in PodsLicenseReader(path: <path-to-acknowledgements-plist>).getLicenses() {
// Dreams come true here
print(license.name)
}
PodsLicenseReader is available under the MIT License.