Code Monkey home page Code Monkey logo

swiftyacknowledgements's Introduction

SwiftyAcknowledgements

Build Status Carthage Compatible Platform

SwiftyAcknowledgements makes it easy to integrate acknowledgements for third party libraries into your iOS Apps.

Requirements

  • iOS 8.0 or higher
  • tvOS 9.0 or higher
  • Xcode 8.2 or higher

Components

SwiftyAcknowledgements consists of two components.

Script

GenerateLicenseFile.swift is a Swift script that scans a directory for files named LICENSE or LICENSE.txt and generates a property list containing the content of every license along with a name. The name will be set to the name of the folder that the corresponding license file is contained in.

Framework

SwiftyAcknowledgements comes with a framework SwiftyAcknowledgements.framework that can be used to visualize the generated license file within an iOS App. The framework contains a TableViewController and a DetailViewController and can be integrated programatically or using a Storyboard.

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate SwiftyAcknowledgements into your Xcode projekct using Carthage, specify it in your Cartfile:

github "mathiasnagler/SwiftyAcknowledgements"

Follow the instructions in the Carthage Documentation to install the built framework into your Xcode project.

Script

To integrate the script into your Xcode project create a subfolder Scripts in the folder that contains your Xcode project. Then, copy GenerateLicenseFile.swift to that subfolder. In your target, create a new Run Script Build Phase like this:

${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/iOS\ Example/Acknowledgements.plist

Note: The first parameter for the script is the input directory that should be scanned for license files. The second parameter is the output file that should be generated by the script.

After that, build your project and add the generated license file to your Xcode project.

Usage

The framework contains AcknowledgementsTableViewController.swift that can be pushed onto a UINavigationController or presented modally. The AcknowledgementsTableViewController will automatically look for a file Acknowledgements.plist and display its contents. If your license file is named differently, you can specify your custom name using the property acknowledgementsPlistName: String.

Customization

There are several ways you can customize the appearance of SwiftyAcknowledgements ViewControllers. The easiest possibility is to integrate using a storyboard and setting the provided IBInspectables on AcknowledgementsTableViewController. Using this method you can customize font sizes and the text for the table header and footer.

If you need additional customization options, you can always build a custom subclasses for the provided ViewControllers and override the desired methods.

Credits

SwiftyAcknowledgements was inspired by Vincent Tourraine's VTAcknowledgementsViewController.

License

SwiftyAcknowledgements is available under the MIT license. See the LICENSE file for more info.

swiftyacknowledgements's People

Contributors

mathiasnagler avatar danwilliams64 avatar lutzifer avatar

Watchers

James Cloos 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.