Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahmudahsan/licenses
Quick way to showcase 3rd party libraries and their licenses those are used to develop app.
https://github.com/mahmudahsan/licenses
ios-swift ios-ui license-management licenses swift swift-library swift4 xcode
Last synced: 6 days ago
JSON representation
Quick way to showcase 3rd party libraries and their licenses those are used to develop app.
- Host: GitHub
- URL: https://github.com/mahmudahsan/licenses
- Owner: mahmudahsan
- Created: 2017-12-05T12:28:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T13:23:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T16:12:47.186Z (17 days ago)
- Topics: ios-swift, ios-ui, license-management, licenses, swift, swift-library, swift4, xcode
- Language: Swift
- Size: 4.76 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Licenses
Quick way to showcase 3rd party libraries and their licenses those are used to develop app.
Most of the open source license's common terms is that
"The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software."
As normally when we develop app, we use several open source libraries. So this property list based UI library will help to easily integrate to showcase them in part of the app.
There are 2 ways to show credits by this library. If you selected .DESC style, then the license description provided by you will be shown. And .URL style, the url will be redirected when user click to see the license.
## Features
- [x] Showcase open source libraries name with licenses
- [x] Property List (.plist) based data integration
- [x] Delegate to integrate analytics
- [x] Show license description or open url (2 ways)
- [x] Works in iOS apps## Examples Show Description
Integrate within a UIViewController:
```swift
let bundle = Bundle(for: LicensesViewController.self)
let storyboard = UIStoryboard(name: "Licenses", bundle: bundle)let licenseVC = storyboard.instantiateInitialViewController() as! LicensesViewController
licenseVC.title = "Licenses"
licenseVC.loadLicenseList(name: "licenses", viewStyle: .DESC) // without .plist extension
//licenseVC.analytics = self
self.navigationController?.pushViewController(licenseVC, animated: true)
```## Examples Open Url
Integrate within a UIViewController:
```swift
let bundle = Bundle(for: LicensesViewController.self)
let storyboard = UIStoryboard(name: "Licenses", bundle: bundle)let licenseVC = storyboard.instantiateInitialViewController() as! LicensesViewController
licenseVC.title = "Licenses"
licenseVC.loadLicenseList(name: "licenses", viewStyle: .URL) // without .plist extension
//licenseVC.analytics = self
self.navigationController?.pushViewController(licenseVC, animated: true)
```licenses.plist file structure:
```xml
libraries
title
Appirater
url
https://github.com/arashpayan/appirater.git
license
MIT License
desc
Copyright 2017. [Arash Payan] arash. This library is distributed under the terms of the MIT/X11.
While not required, I greatly encourage and appreciate any improvements that you make to this library be contributed back for the benefit of all who use Appirater.
title
AppsPortfolio
url
https://github.com/mahmudahsan/AppsPortfolio
license
MIT License
desc
...
```
## Usage in an iOS application
Either
- Drag the folders Licenses/Sources folder into your application's Xcode project.
or
- Use Swift Package manager to include Licenses as a dependency in your project.
```Ruby
pod 'Licenses', :git => 'https://github.com/mahmudahsan/Licenses'
```- In your project create a new **licenses.plist** file and supply the libraries name, urls and licenses. Follow the licenses.plist file format provided in Licenses/Data.
## Questions or feedback?
Feel free to [open an issue](https://github.com/mahmudahsan/Licenses/issues/new), or find me [@mahmudahsan on Twitter](https://twitter.com/mahmudahsan).