From 444f72349894547748cbd19ff4f3ff285ee6f23b Mon Sep 17 00:00:00 2001 From: Florian Gabach Date: Tue, 28 Feb 2017 09:09:37 +0100 Subject: [PATCH] Add documentation --- .../OpenSourceController/ViewController.swift | 5 ++ LICENSE | 2 +- OpenSourceController.podspec | 13 +-- README.md | 81 +++++++++++++++++-- 4 files changed, 83 insertions(+), 18 deletions(-) diff --git a/Example/OpenSourceController/ViewController.swift b/Example/OpenSourceController/ViewController.swift index 6423cb6..0d8f04b 100644 --- a/Example/OpenSourceController/ViewController.swift +++ b/Example/OpenSourceController/ViewController.swift @@ -22,11 +22,16 @@ class ViewController: UIViewController { } @IBAction func showOpenSource(_ sender: Any) { + // 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) } } diff --git a/LICENSE b/LICENSE index 57ba988..6995a99 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017 terflogag +Copyright (c) 2016 Florian Gabach Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/OpenSourceController.podspec b/OpenSourceController.podspec index f66b7d1..bca6ace 100644 --- a/OpenSourceController.podspec +++ b/OpenSourceController.podspec @@ -1,17 +1,12 @@ Pod::Spec.new do |s| s.name = 'OpenSourceController' s.version = '0.1.0' -s.summary = 'Blablablabla blabbla blabbla blabbla' -s.description = 'Blablablabla blabbla blabbla blabbla blabbla blabbla blabbla blabbla blabbla blabbla' -s.homepage = 'https://github.com/terflogag/GBHFacebookImagePicker' +s.summary = 'Display all the librarys licence used in your application. Enjoy !' +s.description = 'Display a screen with all licence used in your apply 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.' +s.homepage = 'https://github.com/terflogag/OpenSourceController' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'Florian Gabach' => 'contact@floriangabach.fr' } -s.source = { :git => 'https://github.com/terflogag/GBHFacebookImagePicker.git', :tag => s.version.to_s } +s.source = { :git => 'https://github.com/terflogag/OpenSourceController.git', :tag => s.version.to_s } s.ios.deployment_target = '9.0' s.source_files = 'OpenSourceController/Classes/**/*' -s.resource_bundles = { -'OpenSourceController' => [ -'Images/*.{png}','OpenSourceController/Classes/Storyboard/*.{storyboard,xib}' -] -} end diff --git a/README.md b/README.md index 3aed529..b402e2d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,41 @@ -# OpenSourceController +

+Prs welcome +

-[![CI Status](http://img.shields.io/travis/terflogag/OpenSourceController.svg?style=flat)](https://travis-ci.org/terflogag/OpenSourceController) -[![Version](https://img.shields.io/cocoapods/v/OpenSourceController.svg?style=flat)](http://cocoapods.org/pods/OpenSourceController) -[![License](https://img.shields.io/cocoapods/l/OpenSourceController.svg?style=flat)](http://cocoapods.org/pods/OpenSourceController) -[![Platform](https://img.shields.io/cocoapods/p/OpenSourceController.svg?style=flat)](http://cocoapods.org/pods/OpenSourceController) +

+Features +• Installation +• Usage +• Translation +• License +

+ +Display a screen with all licence used in your apply 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. + +## Features + +- [x] Display tableView with licences used in your app +- [x] AppStore ready +- [x] Swift 3 +- [ ] Download licence from Podfile +- [ ] Download licence from Cartfile +- [ ] Carthage support (feel free to make PR) +- [ ] Unit & UI Test (feel free to make PR) ## Example -To run the example project, clone the repo, and run `pod install` from the Example directory first. +In your terminal : + +```ruby +pod try OpenSourceController +``` ## Requirements +* Xcode 8 +* iOS 9.0+ target deployment +* Swift 3 project + ## Installation OpenSourceController is available through [CocoaPods](http://cocoapods.org). To install @@ -20,10 +45,50 @@ it, simply add the following line to your Podfile: pod "OpenSourceController" ``` +## Usage + +- Import the library : + +```swift +import OpenSourceController +``` + +- Display the controller : + +```swift +// 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) +``` + +## 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 : + +``` +"Tiers library" = ""; +``` + +## Applications + +Some applications already use this picker like : +- [Troll Generator](https://itunes.apple.com/fr/app/troll-generator/id1038097542?mt=8) +- [Giraf](https://itunes.apple.com/fr/app/giraf/id1136592561?mt=8) + +What about yours ? If your application also use this library, feel free to contact me or make pull request on the README 😁 + ## Author -terflogag, florian.gabach@gmail.com +Florian Gabach, contact@floriangabach.fr ## License -OpenSourceController is available under the MIT license. See the LICENSE file for more info. +OpenSourceController is available under the [MIT license](LICENSE).