Last Updated: February 25, 2016
·
3.027K
· netbe

Easy Licensing with cocoapods

I have just discovered a (hidden) feature of Cocoapods that helps you dealing with licenses.

post_install do | installer |
  require 'fileutils'
  FileUtils.cp_r('Pods/Pods-Acknowledgements.plist', Resources/Settings.bundle/Acknowledgements.plist', :remove_destination => true)
end

Using the above code in your Podfile, it copies all licenses provided by your dependencies and copy them to a plist that can be read by a Settings.bundle.

Source: https://github.com/CocoaPods/CocoaPods/wiki/Acknowledgements#ios-setting-bundle