Git Product home page Git Product logo

licensegenerator-ios's Introduction

#LicenseGenerator iOS

Build Status

Recursively finds all LICENSE.* files in a directory and generates a plist that can be displayed in Settings.bundle or the provided view controller.

The script can help ensure that the license section of your app is always up to date. Since it searches recursively the script works well with cocoapods projects.

Inspired by JosephH and Sean's comments on stackoverflow.

##Build Script

The buiild script resursively searches the project for LICENSE files and generates a plist that can be used in a Settings.bundle. The script assumes that the parent directory of the LICENSE file is also the name of the library to be credited.

####Usage

  • Copy credits.py to the your project root
  • Open your project, select your Target and select Build Phases
  • Add a new Run Script Phase after target dependencies
  • Add something like: ./credits.py -s "$SRCROOT" -o "$SRCROOT/Project/Settings.bundle/Credits.plist"
  • Build & profit

####Excluding Directories You can optionally tell the generator to ignore certain paths. To do so use the -e option and pass it a comma seperated list of path fragments.

##View Controller If your app doesn't use a Settings.bundle you can use the provided view controller to show the licenses.

####Instalation

Add LicensesViewController to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'LicensesViewController', '~> 0.5.0'

Then tell Pod to install it:

$ pod install

Grab credits.py from this repo and add it to your project.

####Usage

Add the build script as described above and make sure the resulting plist is included in the app target.

import LicensesViewController

// ...

let licensesController = LicensesViewController()
licensesController.loadPlist(NSBundle.mainBundle(), resourceName: "Credits")

// ...

####Example Project

git clone https://github.com/carloe/LicenseGenerator-iOS.git
cd LicenseGenerator-iOS/Example
pod install
open LicensesViewControllerExample.xcworkspace

####Requirements

  • iOS 8.0

##Contact Twitter: @carloeugster Email: [email protected]

##License MIT

licensegenerator-ios's People

Contributors

carloe avatar owenworley avatar stefanomondino avatar tghs avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.