测试已测试 | ✓ |
语言语言 | Objective-CObjective C |
许可证 | MIT |
发布上次发布 | 2015年9月 |
由 Bas van Kuijck 维护。
一个 bash 脚本,它可以自动生成所有使用您 CocoaPods 项目的许可证文件的 HTML 文件
查看 example-output.html 以获得输出示例
将以下行添加到您的 Podfile 中
pod 'ESOpenSourceLicenses/Swift'
post_install do |installer_representation|
system("sh Pods/ESOpenSourceLicenses/ESOpenSourceLicenses/Scripts/generate_licenses.sh")
end
运行 pod update
或 pod install
然后打开一个 ESOpenSourceLicensesViewController
import ESOpenSourceLicenses
let vc = ESOpenSourceLicensesViewController()
let navvc = UINavigationController(rootViewController: vc)
self.presentViewController(navvc, animated: true) { _ in
}
将以下行添加到您的 Podfile 中
pod 'ESOpenSourceLicenses/Objc'
post_install do |installer_representation|
system("sh Pods/ESOpenSourceLicenses/ESOpenSourceLicenses/Scripts/generate_licenses.sh")
end
运行 pod update
或 pod install
然后打开一个 ESOpenSourceLicensesViewController
#import <ESOpenSourceLicensesViewController.h>
ESOpenSourceLicensesViewController *vc = [ESOpenSourceLicensesViewController new];
UINavigationController *navVc = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:navVc animated:YES completion:nil];
请记住,该项目依赖于 CocoaPods。因为它在 Pods
目录中搜索许可证文件。但如果您不想使用此 pods,您可以从终端手动执行 bash 脚本。
cd /Path/to/xcode-workspace/
sh ./generate_licenses.sh licenses.html
然后将 licenses.html 文件拖放到您的项目中,您可以使用它来在 UIWebView
中加载。
ESOpenSourceLicensesView
NSArray
表示形式