Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        

# Licenses



CocoaPods

swift 4.0

CocoaPods


Swift Package Manager


Twitter: @mahmudahsan



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.




Licenses Preview
Licenses Preview

## 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).