ESOpenSourceLicenses 1.3

ESOpenSourceLicenses 1.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2015

Maintained by Bas van Kuijck.




  • By
  • Bas van Kuijck

A bash script to automatically generate an HTML file of all the license files used with your CocoaPods Project

Example

See example-output.html for an example output

Usage

Swift

Add the following lines to your PodFile:

pod 'ESOpenSourceLicenses/Swift'

post_install do |installer_representation|
   system("sh Pods/ESOpenSourceLicenses/ESOpenSourceLicenses/Scripts/generate_licenses.sh")
end

Run pod update or pod install

And then open a ESOpenSourceLicensesViewController:

import ESOpenSourceLicenses

let vc = ESOpenSourceLicensesViewController()
let navvc = UINavigationController(rootViewController: vc)
self.presentViewController(navvc, animated: true) { _ in

}

Objective-c

Add the following lines to your PodFile:

pod 'ESOpenSourceLicenses/Objc'

post_install do |installer_representation|
   system("sh Pods/ESOpenSourceLicenses/ESOpenSourceLicenses/Scripts/generate_licenses.sh")
end

Run pod update or pod install

And then open a ESOpenSourceLicensesViewController:

#import <ESOpenSourceLicensesViewController.h>

ESOpenSourceLicensesViewController *vc = [ESOpenSourceLicensesViewController new];
UINavigationController *navVc = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:navVc animated:YES completion:nil];

Manual

Remember that the project depends on CocoaPods. Because it searches for LICENSE files within the Pods directory. But if you prefer not to use this pod, you can manually call the bash script from your terminal:

cd /Path/to/xcode-workspace/
sh ./generate_licenses.sh licenses.html

Then drag/drop the licenses.html file to your project and you can use it to load in a UIWebView

Customization

Todo

  • [x] CocoaPods
  • [x] Customization of the ESOpenSourceLicensesView
  • [x] Swift 1.2
  • [x] Swift 2.0
  • [ ] A .plist file of all the licenses
  • [ ] An NSArray representation of the license files