Generate a list of licenses for the Swift Package libraries that your app depends on.

Last update: Jun 16, 2022

LicenseList

Generate a list of licenses for the Swift Package libraries that your app depends on.

Github issues Github forks Github stars Top language Release Github license

Example

top mit apache

Requirements

  • Written in Swift 5
  • Compatible with iOS 13.0+
  • Developement with Xcode 13.0+

Installation

LicenseList is available through Swift Package Manager.

Xcode

  1. Select File > Add Packages...
  2. Search https://github.com/cybozu/LicenseList.git
  3. Add Package (add LicenseList library to target but don't add spp executable to target).

Usage

  1. Create license-list.plist at the project root directory and add it to the project as a bundle resource.

    $ cd [project root path]
    $ echo '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict></dict></plist>' > license-list.plist

    ⚠️ Note: When you add license-list.plist to the project, you mast remove the check mark from "Copy items if needed".

  2. Add Run Script to the Build Phase of the Target.

    SOURCE_PACKAGES_PATH=`echo ${BUILD_DIR%Build/*}SourcePackages`
    
    # Build SourcePackagesParser
    xcrun --sdk macosx swift build -c release \
      --package-path ${SOURCE_PACKAGES_PATH}/checkouts/LicenseList \
      --product spp
    
    # Run SourcePackagesParser
    ${SOURCE_PACKAGES_PATH}/checkouts/LicenseList/.build/release/spp ${SRCROOT} ${SOURCE_PACKAGES_PATH}

    ⚠️ Note: This "Run Script" should be added before the "Copy Bundle Resources" step.

  3. Coding (Example)

    • with UIKit

      import LicenseList
      
      // in ViewController
      let fileURL = Bundle.main.url(forResource: "license-list", withExtension: "plist")!
      let vc = LicenseListViewController(fileURL: fileURL)
      vc.title = "LICENSE"
      navigationController?.pushViewController(vc, animated: true)
    • with SwiftUI

      import LicenseList
      
      struct ContentView: View {
          let url = Bundle.main.url(forResource: "license-list", withExtension: "plist")!
      
          var body: some View {
              NavigationView {
                  LicenseListView(fileURL: url)
                      .navigationTitle("LICENSE")
              }
          }
      }

SourcePackagesParser (spp)

SourcePackageParser is a command line tool that parses the license information of the Swift Package libraries on which the project depends based on workspace-state.json inside the DerivedData directory.

Usage

$ swift run spp [base directory path] [SourcePackages directory path]
  • [bese directory path]

    Path of the directory where the license-list.plist file will be placed.

  • [SourcePackages directory path]

    Example: ~/Library/Developer/Xcode/DerivedData/project-name-xxxxxxxx/SourcePackages

GitHub

https://github.com/cybozu/LicenseList
You might also like...

PerFolderResourcesPublishPlugin - Per-folder resources plugin for the Publish package

Per-folder resources for Publish A Publish plugin that copies per-folder resourc

Feb 18, 2022

Shows your photo library grouped by events, to easily export them to your computer

Shows your photo library grouped by events, to easily export them to your computer

Groupir Shows your photo library grouped by events, to easily export them to your computer Features Currently supported features: reading your photo l

Dec 15, 2021

Lightbox is a convenient and easy to use image viewer for your iOS app

Lightbox is a convenient and easy to use image viewer for your iOS app

Lightbox is a convenient and easy to use image viewer for your iOS app, packed with all the features you expect: Paginated image slideshow. V

Jun 16, 2022

GIFImage component for your SwiftUI app!

GIFImage component for your SwiftUI app!

SwiftUI GIF Lightweight SwiftUI component for rendering GIFs from data or assets, with no external dependencies. As a bonus, there's an extension that

Jun 3, 2022

ImagePicker : an all-in-one camera solution for your iOS app

ImagePicker : an all-in-one camera solution for your iOS app

Description ImagePicker is an all-in-one camera solution for your iOS app. It lets your users select images from the library and take pictures at the

Dec 1, 2021

An app show your Live Photo and export as GIF.

An app show your Live Photo and export as GIF.

LivelyGIFs Show your Live Photo and export as GIF. Demo HighLights Do not use Pod or Cathage to install 3rd party library Simple logic, new learner fr

Apr 15, 2022

PhotoEditor SDK: A fully customizable photo editor for your app.

About PhotoEditor SDK for iOS Our SDK provides tools for adding photo editing capabilities to your iOS application with a big variety of filters that

Jun 8, 2022

Use `PreselectedPhotoViewController` to handle limited photo access case in your app.

Use `PreselectedPhotoViewController` to handle limited photo access case in your app.

PreselectedPhotoUI Use PreselectedPhotoViewController to handle limited photo access case in your app. Overview Supports iOS 14.0 or later How to use?

Jun 21, 2022

Photo-Sharing-App - Photo Sharing App With Swift

Photo-Sharing-App - Photo Sharing App With Swift

Photo Sharing App You can register and log in to this application and share your

Jun 14, 2022
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

Jun 24, 2022
Generate random user Avatars for apps.
Generate random user Avatars for apps.

Avatar Generate random user Avatars for apps. Works for iOS 9.3+ Installation Simply install using Cocoapods, add 'pod Avatar' to your podfile Simple

Mar 16, 2022
React-native-image-generator - Library to generate images from layers
React-native-image-generator - Library to generate images from layers

react-native-image-generator Library for generate images from other images Insta

May 29, 2022
🎨 Mondrian is lightweight Swift package that provides a universal basis for your design system's color palette.

??‍?? Mondrian Mondrian provides a universal basis on which to build your design system's color palette right from your codebase. With support for all

Nov 24, 2021
Swift Package Manager command plugin for Swift-DocC

Swift-DocC Plugin The Swift-DocC plugin is a Swift Package Manager command plugin that supports building documentation for SwiftPM libraries and execu

Jun 23, 2022
This package integrates a UIImagePickerController into a SwiftUI app.
This package integrates a UIImagePickerController into a SwiftUI app.

This Swift Package integrates a UIImagePickerController into a SwiftUI app and allows a user to select, scale and position an image to be cropped and saved as a conatct's photo, similar to the stock iOS Contacts app.

May 14, 2022
Shows a list of albums initially and shows the image in detailed view.

Description : PhotosViewer Shows a list of albums initially. Selcting any album will lead to a photos list screen Tapping on any photo will display a

Dec 27, 2021
DittoSwift - Swift package for the DittoSwift framework

DittoSwift Swift package for the DittoSwift framework. See the Ditto iOS Install

Feb 17, 2022
PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view.
PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view.

PrettyBorder Description PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view. Preview of end result

Oct 13, 2021
URLImage is a package that holds an easy way of showing images from an URL.
URLImage is a package that holds an easy way of showing images from an URL.

URLImage Overview URLImage is a package that holds an easy way of showing images from an URL. Usually this processes should take the following process

Nov 1, 2021