2017-04-04 17:45:47 +02:00
2017-04-04 17:07:12 +02:00
2017-04-04 17:43:54 +02:00
2017-04-04 17:16:48 +02:00
2017-04-04 17:07:12 +02:00
2017-04-04 17:07:12 +02:00
2017-04-04 17:44:40 +02:00
2017-03-08 17:00:21 +01:00
2017-04-04 17:07:12 +02:00
2017-04-04 17:45:47 +02:00
2017-04-04 17:20:30 +02:00

OpenSourceController

Cocoapods version Cocoapods plateform Prs welcome

FeaturesInstallationUsageTranslationCustomisationLicense

Display a screen with all licences used in your application can be painful to maintain. OpenSourceController was built to respond to this problem. OpenSourceController is a simple parser to display the licences which are used in your application.

OpenSourceController

Features

  • Display tableView with licences used in your app
  • Download licence from an URL

Todo (feel free to make PR)

Requirements

  • Xcode 8
  • iOS 9.0+ target deployment
  • Swift 3 project

Installation

  • To integrate OpenSourceController into your Xcode project using CocoaPods, specify it in your Podfile :
pod "OpenSourceController"
  • To integrate OpenSourceController into your Xcode project using Carthage, specify it in your Cartfile :
github "terflogag/OpenSourceController" 

Usage

  • Import the library :
import OpenSourceController
  • Display the controller :
// Create controller 
let openSourceVC = OpenSourceController()

// Init with LicenceFile object 
openSourceVC.licences = [LicenceFile(title: "FacebookImagePicker", 
url: "https://raw.githubusercontent.com/terflogag/FacebookImagePicker/master/LICENSE"),
LicenceFile(title: "JSQMessagesViewController", 
url: "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/LICENSE")]

// Present controller 
openSourceVC.presentOpenSourceController(from: self)

Customisation

You can apply some customisation. To do it you can use the OpenSourceControllerConfig structure like this :

// Navigation bar title 
openSourceVC.config.title = "MyCustomTitle"

// Navigation bar tint color
openSourceVC.config.uiConfig.barTintColor = UIColor.red

// Close button color 
openSourceVC.config.uiConfig.closeButtonColor = UIColor.white

// BackgroundColor 
openSourceVC.config.uiConfig.backgroundColor = UIColor.red.withAlphaComponent(0.6)

// Licence text color  
openSourceVC.config.uiConfig.licenceTextColor = UIColor.white

// Navigation bar title color
openSourceVC.config.uiConfig.titleColor = UIColor.white

// Licence cell background color 
openSourceVC.config.uiConfig.licenceBackgroundColor = UIColor.red

// Verbose mode 
openSourceVC.config.verbose = true

Translation

OpenSourceController is currently write in english. If you need translation for the permission popup (or whatever thing), just add this line in your localized file :

"Unable to load this licence." = "<your_translation>";

Applications

Some applications already use this controller like :

What about yours ? If your application also use this library, feel free to contact me or make pull request on the README 😁

Author

Florian Gabach, contact@floriangabach.fr

License

OpenSourceController is available under the MIT license.

S
Description
The simplest way to display the librarie's licences used in your application.
Readme MIT
6.5 MiB
Languages
Swift 73.2%
HTML 21.4%
Ruby 5.4%