The simplest way to display the librarie's licences used in your application.

Overview

OpenSourceController

Cocoapods version Cocoapods plateform Prs welcome

FeaturesUsageTranslationCustomisationInstallationLicense

Display a screen with all licences used in your application 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.

OpenSourceController

Features

  • Display tableView with licences used in your app
  • Download licence from an URL

Requirements

  • Xcode 11
  • iOS 9.0+ target deployment
  • Swift 3, Swift 4 or Swift 5.1 project

Usage

  • Import the library :
import OpenSourceController
  • Display the controller :
// 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)

// OR push the controller if the source controller is embeded in navigation controller
openSourceVC.pushOpenSourceController(from: self)

With SwiftUI :

struct OpenSourceView: UIViewControllerRepresentable {
    @available(iOS 13, *)
    public func updateUIViewController(_ uiViewController: OpenSourceViewController, context: UIViewControllerRepresentableContext<OpenSourceView>) {
        //
    }
    
    @available(iOS 13, *)
    public func makeUIViewController(context: UIViewControllerRepresentableContext<OpenSourceView>) -> OpenSourceViewController {
        let openSourceVC = OpenSourceViewController(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")],
                                                    showCloseButton: true,
                                                    configuration: OpenSourceControllerConfig(),
                                                    licenceLoader: LicenceLoader())
        return openSourceVC
    }
}

Customisation

You can apply some customisation. To do it you can use the OpenSourceControllerConfig structure like this :

// Navigation bar title 
openSourceVC.config.title = "MyCustomTitle"

// Close button color 
openSourceVC.config.uiConfig.closeButtonColor = UIColor.white

// BackgroundColor 
openSourceVC.config.uiConfig.backgroundColor = UIColor.red.withAlphaComponent(0.6)

// Licence text color  
openSourceVC.config.uiConfig.licenceTextColor = UIColor.white

// Navigation bar title color
openSourceVC.config.uiConfig.titleColor = UIColor.white

// Licence cell background color 
openSourceVC.config.uiConfig.licenceBackgroundColor = UIColor.red

// Verbose mode 
openSourceVC.config.verbose = true

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 :

"Unable to load this licence." = "<your_translation>";

Installation

  • To integrate OpenSourceController into your Xcode project using Swift Packet Manager, specify this url in Xcode : https://github.com/floriangbh/OpenSourceController

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

pod "OpenSourceController", '~> 3.0.0' # Swift 4.2 Version

pod "OpenSourceController", '~> 2.0' # Swift 4.0 Version 

pod "OpenSourceController", '~> 1.0.8' # Swift 3.1 version
  • To integrate OpenSourceController into your Xcode project using Carthage, specify it in your Cartfile :
github "floriangbh/OpenSourceController" ~> 3.0.0 # Swift 4.2 version

github "floriangbh/OpenSourceController" ~> 2.0 # Swift 4.0 version

github "floriangbh/OpenSourceController" ~> 1.0.8 # Swift 3.1 version

Author

Florian Gabach, [email protected]

License

OpenSourceController is available under the MIT license.

You might also like...
A way to easily add Cocoapod licenses and App Version to your iOS App using the Settings Bundle
A way to easily add Cocoapod licenses and App Version to your iOS App using the Settings Bundle

EasyAbout Requirements: cocoapods version 1.4.0 or above. Why you should use Well, it is always nice to give credit to the ones who helped you 😃 Bonu

A quick and "lean" way to swizzle methods for your Objective-C development needs.

Swizzlean A quick and "lean" way to swizzle methods for your Objective-C development needs. Adding Swizzlean to your project Cocoapods CocoaPods is th

LifetimeTracker can surface retain cycle / memory issues right as you develop your application
LifetimeTracker can surface retain cycle / memory issues right as you develop your application

LifetimeTracker Bar style Circular style LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will s

A visual developer tool for inspecting your iOS application data structures.
A visual developer tool for inspecting your iOS application data structures.

Tree Dump Debugger A visual developer tool for inspecting your iOS application data structures. Features Inspect any data structure with only one line

Automatically set your keyboard's backlight based on your Mac's ambient light sensor.
Automatically set your keyboard's backlight based on your Mac's ambient light sensor.

QMK Ambient Backlight Automatically set your keyboard's backlight based on your Mac's ambient light sensor. Compatibility macOS Big Sur or later, a Ma

LibAuthentication will simplify your code when if you want to use FaceID/TouchID in your tweaks.

LibAuthentication will simplify your code when if you want to use FaceID/TouchID in your tweaks.

RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) Track your location and send your logs to RNH Regatta :-)

RNH Tracker for iOS + WatchOS RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) with offline map cache support. Track your location, add waypoi

Record your position and export your trip in GPX with GPS Stone on iOS.

GPS Stone Register your trips and export them as GPX files. Notes We currently have included a UIRequiredDeviceCapabilities with a location-services v

The fastest 🚀 way to embed a 3D model in Swift
The fastest 🚀 way to embed a 3D model in Swift

Insert3D is the easiest 🥳 and fastest 🚀 way to embed a 3D model in your iOS app. It combines SceneKit and Model I/O into a simple library for creati

Comments
  • Title: Tiers library

    Title: Tiers library

    There doesn't seem to be a way to change the title on the view controller and "Tier library" is hard coded. Also, the text color and background colors are not exposed publicly. It would be nice to have control over these as properties on OpenSourceController.

    opened by DavidLari 3
  • SwiftUI support

    SwiftUI support

    This is to support SwiftUI, by referencing a struct wrapped ViewController. On client-side, you still need to implement UIViewControllerRepresentable as denoted in https://www.hackingwithswift.com/books/ios-swiftui/wrapping-a-uiviewcontroller-in-a-swiftui-view.

    opened by doronkatz 2
Releases(4.1.1)
Owner
Florian Gabach
French software engineer
Florian Gabach
Headline News Widget for Pock.You can display the articles fetched by rss.

Headline News Widget for Pock This is a headline news widget plugin for Pock You can display the articles fetched by rss. Demo In the demo video, the

null 11 Aug 30, 2022
Software Dummy Display Adapter for Apple Silicon Macs to Have Custom HiDPI Resolutions.

BetterDummy Dummy Display for Apple Silicon Macs to achieve custom resolutions. About M1 macs tend to have issues with custom resolutions. Notoriously

Istvan T. 8k Jan 9, 2023
Display LaTeX using SwiftUI & LaTeX DSL

Swift LaTeX Display LaTeX using MathJax. The package also provides a custom LaTeX DSL, which enables you write LaTeX the way you write SwiftUI Views.

Vaida 2 Oct 28, 2022
This package will contain the standard encodings/decodings/hahsing used by the String Conversion Tool app.

This package will contain the standard encodings/decodings/hahsing used by the String Conversion Tool app. It will also, however, contain extra encoding/decoding methods (new encoding/decoding)

Gleb 0 Oct 16, 2021
μ-library enabling if/else and switch statements to be used as expressions.

swift-expression Many languages such as Scala, Rust and Kotlin support using if/else and switch statements as expressions – meaning that they can by t

Nikita Mounier 1 Nov 8, 2021
A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar.

bose-macos-utility A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar. Why Have you e

Łukasz Zalewski 11 Aug 26, 2022
A NEWS app which can be used to read,share and bookmark articles of various categories

Scoop A NEWS App for iOS 14 built using Swift which allow the users to read,bookmark and share news articles. Built using MVC architecture Requirement

Sai Balaji 3 Oct 12, 2022
iOS helper library that contains commonly used code in Uptech iOS projects

iOS helper library that contains commonly used code in Uptech iOS projects.

Uptech 1 Apr 1, 2022
MediaType is a library that can be used to create Media Types in a type-safe manner.

This is a general purpose Swift library for a concept of typed treatment for Media Types. We use this library on clients and servers to speak the same dialect and to enjoy all the comfort strong types provide over raw strings.

21Gram Consulting 79 Jul 19, 2022
A collection of common tools and commands used throughout the development process, customized for Kipple projects.

KippleTools A collection of common tools and commands used throughout the development process, customized for Kipple projects. ⚠️ The code in this lib

Kipple 10 Sep 2, 2022