Latest 1.0.1
License MIT
Platforms ios 9.0, requires ARC

A simple way to display third-party attributions in an iOS project.

Animated gif



CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Credits into your Xcode project using CocoaPods, specify it in your Podfile:

source ''
platform :ios, '10.0'

target '<Your Target Name>' do
pod 'Credits'

Then, run the following command:

$ pod install

Be sure to add a "Copy Framework" step in Xcode > Project > Target > Build Phases
alt text


See the included example for how to instantiate, but this is a simple example:

// Load plist file in an array for the parser to use
let licensePath = Bundle.main.path(forResource: "licenses", ofType: "plist")
// Create a new license parser
let parser = LicenseParser(licensePath: licensePath!)
// Create a new Credits view controller
let controller = CreditsViewController.creditsViewController(parser: parser!)
present(controller, animated: true, completion: nil)

License Property List Format

The license file must be a Property List using the following format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Copyright (c) 2014-2016... (rest of license contents)

title is replaced by the title of the third-party project.

link is a link to whereever the project is (e.g. GitHub).

content is the license file content.

Custom HTML

You can load custom body and content HTML for display in the web view as follows:

// Custom body and content HTML
let bodyHTMLPath = Bundle.main.path(forResource: "license-body", ofType: "html")
let contentHTMLPath = Bundle.main.path(forResource: "license-content", ofType: "html")
let parser = LicenseParser(licensePath: licensePath, licenseHTMLBodyPath: bodyHTMLPath, licenseHTMLContentPath: contentHTMLPath)

The body HTML must contain the flagged variable $CONTENT which is replaced by the parsed license file content.

<!DOCTYPE html>
<html lang="en">
The following sets forth attribution notices for third party software that may be contained in portions of this product.

The content HTML (for each individual license) contains three flags as shown in the example:

<div class="license-title">
<div class="license-link">$LINK</div>
<div class="license-content">
$CONTENT <!-- Wrap each license in <p></p> for proper formatting -->

$TITLE is replaced by the title of the third-party project.

$LINK is a link to whereever the project is (e.g. GitHub).

$CONTENT is the license file content.


Credits is released under the MIT license. See LICENSE for details.

Latest podspec

    "name": "Credits",
    "version": "1.0.1",
    "summary": "A framework for displaying third-party attributions in iOS projects.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Christopher Combes": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "requires_arc": true,
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": "Source/*.swift",
    "resources": "Source/*.{html,storyboard}",
    "resource_bundles": {
        "Credits": [
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This