Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies.

Overview

VTAcknowledgementsViewController

Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies.

Platform iOS Build Status CocoaPods compatible MIT license

Also available in Swift with AcknowList.

VTAcknowledgementsViewController screenshots

Features

  • Automatically load acknowledgments from CocoaPods-generated file
  • Remove unnecessary line breaks from licenses for better text wrapping
  • Optional list header and footer
  • Tappable links in header, footer, and acknowledgment text
  • Storyboard support
  • Dark Mode support
  • Dynamic Type support
  • Localized in 12 languages

Installation

CocoaPods is the most common solution to install this library.

  1. Add pod 'VTAcknowledgementsViewController' to your Podfile.
  2. Run pod install.
  3. Add the Pods-#target#-acknowledgements.plist file generated by CocoaPods to your main target: drag and drop the file from the Pods/Target Support Files/Pods-#target#/ folder in your Xcode project (don’t copy the file, leave Copy items if needed unchecked).

Initialization

The VTAcknowledgementsViewController instance is usually pushed to an existing UINavigationController.

VTAcknowledgementsViewController *viewController = [VTAcknowledgementsViewController acknowledgementsViewController];
[self.navigationController pushViewController:viewController animated:YES];

By default, the controller will try to guess the name of your .plist file, based on the bundle name (Pods-#bundle-name#-acknowledgements.plist). If that doesn’t match the file you’re looking for, you can initialize the view controller with a custom file name or path.

viewController = [[VTAcknowledgementsViewController alloc] initWithFileNamed:@"Pods-MyTarget-acknowledgements"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Pods-MyTarget-acknowledgements" ofType:@"plist"];
viewController = [[VTAcknowledgementsViewController alloc] initWithPath:path];

If you want to include licenses that are not part of a plist file, you can easily create new VTAcknowledgement instances, and use them for the acknowledgements array of the controller.

VTAcknowledgement *customLicense = [[VTAcknowledgement alloc] initWithTitle:@"..." text:@"..." license:nil];
viewController = [[VTAcknowledgementsViewController alloc] initWithAcknowledgements:@[customLicense]];

Customization

The controller can also display a header and a footer. By default, they are loaded from the generated plist file, but you can also directly change the properties values. If these texts contain a link, the view is tappable, and opens a browser with the URL.

viewController.headerText = @"We love open source software.";
viewController.footerText = @"Powered by CocoaPods.org";

The controller title is a localized value for “acknowledgements”. You might want to use this localized value for the button presenting the controller.

NSString *localizedTitle = [VTLocalization localizedTitle]; 
[button setTitle:localizedTitle forState:UIControlStateNormal];

By default, VTAcknowledgementsViewController uses the “grouped” table view style. You can choose a different style:

viewController = [[VTAcknowledgementsViewController alloc] initWithAcknowledgements:@[] style:UITableViewStylePlain];

If you need to further customize the appearance or behavior of this library, feel free to subclass its classes.

Apple TV

VTAcknowledgementsViewController is also compatible with tvOS for Apple TV apps.

VTAcknowledgementsViewController Apple TV screenshots

Requirements

VTAcknowledgementsViewController supports iOS 9.0 or tvOS 9.0 and above, and requires Xcode 11.0 and above. If you need lower requirements, look for an older version of this repository.

Credits

VTAcknowledgementsViewController was created by Vincent Tourraine, and improved by a growing list of contributors.

License

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

Comments
  • Automating Pods-Acknowledgements.plist copy

    Automating Pods-Acknowledgements.plist copy

    If you want to automatically copy Pods-Acknowledgements, there are two options:

    Add a hook to the Podfile:

    post_install do | installer |
        require 'fileutils'
        FileUtils.cp_r('Pods/Pods-Acknowledgements.plist', 'Pods-Acknowledgements.plist', :remove_destination => true)
    end
    

    or

    Add a new run script build phase at the end of your target build phases with the following line:

    cp ${SRCROOT}/Pods/Pods-acknowledgements.plist ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Pods-acknowledgements.plist
    
    opened by billyto 11
  • The `textView` is not initialized on `init`

    The `textView` is not initialized on `init`

    The release 0.15 removed the textViewFont property, replaced with a more flexible textView.

    This textview is created inside the loadView method of the VTAcknowledgementViewController class. This means that is not possible to customize ad usual in the didSelectRowAtIndexPath:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        VTAcknowledgement *acknowledgement = self.acknowledgements[indexPath.row];
        VTAcknowledgementViewController *viewController = [[VTAcknowledgementViewController alloc] initWithTitle:acknowledgement.title text:acknowledgement.text];
        viewController.textView.font = [UIFont ebk_font:EBKFontTypeNormal]; //At this point the textView is nil.
    }
    
    
    opened by ignazioc 8
  • Setting backgroundColor of table view removes the Done button

    Setting backgroundColor of table view removes the Done button

    Hi @vtourraine.

    Thanks for this great component. I want to use your component and change the backgroundcolor of the table view. Therefore I init the VTAcknowledgementsViewController as follows:

    VTAcknowledgementsViewController *acknowledgementsViewController = [[VTAcknowledgementsViewController alloc] initWithFileNamed:@"Foo"];
    acknowledgementsViewController.view.backgroundColor = [UIColor greencolor];
    
    // Present acknowledgementsViewController
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:acknowledgementsViewController];
    [self.navigationController presentViewController:navigationController animated:YES completion:nil];
    

    The backgroundColor of the table view is now green. However, now the Done button is missing. If I remove setting of the backgroundColor everything is back to normal <=> Done button is visible.

    Where is my mistake? Any Idea? If you need help, e.g. a demo project, do not hesitate contacting me.

    BR

    Tobias

    question 
    opened by honkmaster 6
  • Fixing issue where acknowledgement content was scrolled up slightly

    Fixing issue where acknowledgement content was scrolled up slightly

    While the default value of a UITextView's contentOffset should be CGPointZero I was seeing (iOS 9) the content scrolled slightly up, and under the navigation bar. Resetting the contentOffset after textContainerInset corrects this issue.

    opened by levigroker 6
  • Swift naming conflict for +acknowledgementsViewController

    Swift naming conflict for +acknowledgementsViewController

    It seems that by Swift is clobbering the init method and makes it impossible to call the required convenience initializer.

    let ackVC = VTAcknowledgementsViewController.acknowledgementsViewController()
    

    Results in this error: 'acknowledgementsViewController()' is unavailable: use object construction 'VTAcknowledgementsViewController()'

    If you do what the compiler suggests, Swift calls -init instead of +acknowledgementsViewController, and you end up with empty acknowledgements.

    opened by chrisballinger 6
  • Add legal notices from non-cocoapods libs

    Add legal notices from non-cocoapods libs

    Hello! Is there any automated way to add legal notices from non-cocoapods libs? I see the plist is created automatically from the pods, but not all libraries in all projects are from cocoapods. Do you have any idea about how I can add these legal notices more or less using an automatic way? Thanks.

    question 
    opened by Ricardo1980 5
  • tvOS support #47

    tvOS support #47

    Added tvOS support. It works on tvOS with the changes I made, but the UITextView containing the license text scrolls under the transparent navigation bar, which looks incorrect. That shouldn't be a deal breaker though, because the text is still readable.

    enhancement 
    opened by alexpalman 4
  • how to change color of navigation back button

    how to change color of navigation back button

    Thanks for making a good library. I want to change the color of the navigation back button. But it did not change. Help me...

    guard let openSourceVC = VTAcknowledgementsViewController.acknowledgementsViewController () else {return}
                    
    ////// NOT CHANGE!!
    openSourceVC.navigationController? .navigationBar.tintColor = .black
    openSourceVC.navigationController? .navigationBar.barTintColor = .black
    //////
    
    openSourceVC.navigationItem.title = "SETTING_TEXT8" .localized ()
                    
    openSourceVC.headerText = ""
    openSourceVC.footerText = ""
    push (vc: openSourceVC)
    
    question 
    opened by vkcldhkd 3
  • iOS 9 bug causes application to crash when longpressing and tapping links

    iOS 9 bug causes application to crash when longpressing and tapping links

    After long pressing and afterwards tapping a link an application crashes. This is apparently a iOS bug https://forums.developer.apple.com/thread/19480 The crash occurs only under iOS 9.0 and 9.1

    Reproduction:

    1. Open a detail view including a link.
    2. Long press the link.
    3. Tap the link.
    bug 
    opened by bernhard-eiling 3
  • Fixed swift naming conflict

    Fixed swift naming conflict

    I'm not sure about the method name, but this is a possible fix for #41.

    Apple added the possibility to change the method-selector for Swift using the NS_SWIFT_NAME() macro. An AcknowledgementsViewController can now be created using VTAcknowledgementsViewController.instantiate().

    More info about the NS_SWIFT_NAME()-macro can be found here: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html Hope this helps :)

    opened by b-ray 3
  • Added some UI customization

    Added some UI customization

    • Subtitle can be used in table.
    • Font and text color can be set for header, footer, cells and detail view.
    • Background color can be set for detail view.
    opened by claesjacobsson 3
  • Why 2 libraries (Objective-C/Swift)?

    Why 2 libraries (Objective-C/Swift)?

    Not an issue.

    Are there any particular reasons for maintaining the two repos?

    https://github.com/vtourraine/VTAcknowledgementsViewController

    https://github.com/vtourraine/AcknowList

    question 
    opened by iDevelopper 9
  • UIAppearance Support

    UIAppearance Support

    VTAcknowledgementsViewController should have the following UIAppearance-proxied properties to make it fit to the theme of any app using it to display the used third-party-libraries:

    • titleColor
    • titleFont
    • headerTextColor
    • headerTextFont
    • footerTextColor
    • footerTextFont
    • tableCellDefaultColor
    • tableCellHighlightColor
    enhancement 
    opened by Wooder 1
Releases(2.0.1)
  • 2.0.1(Jun 23, 2021)

  • 2.0.0(Mar 15, 2021)

    • Update VTAcknowledgementsViewController to detect URLs in header and footer
    • Update VTAcknowledgementsViewController initializers
      • Add initWithAcknowledgements: (#69)
      • Add initWithAcknowledgements:style
      • Add initWithPath:style (#70)
      • Remove initWithAcknowledgementsPlistPath:
      • Remove initWithAcknowledgementsFileNamed:
    • Update UIViewController subclasses initializers nullability annotations to match UIKit methods
    • Add VTLocalization to refactor localization methods
    • Rename VTAcknowledgementsParser to VTParser (#72)
    • Remove legacy CocoaPods format support
    • Update deployment target to iOS 9
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta.1(Feb 23, 2021)

  • 1.5.3(Sep 17, 2020)

  • 1.5.2(Apr 15, 2020)

  • 1.5.1(Dec 4, 2018)

  • 1.5(Sep 18, 2018)

  • 1.4.1(Jun 25, 2018)

    • Fix text view inset on VTAcknowledgementViewController (support layout margins, safe area insets) (#62)
    • Update deprecated method
    • Remove support for “readable content guide” on VTAcknowledgementViewController
    Source code(tar.gz)
    Source code(zip)
  • 1.4(Jan 25, 2018)

    • Update VTAcknowledgementsViewController default acknowledgementsViewController initializer with plist file name based on bundle name (Pods-#BUNDLE-NAME#-acknowledgements.plist)
    • Update deployment target to iOS 8.0 (#61)
    • Fix “Semantic Issue” warnings about API availability
    Source code(tar.gz)
    Source code(zip)
  • 1.3(Sep 15, 2017)

    • Support “readable content guide” on VTAcknowledgementViewController
    • Fix iPhone X layout (#60)
    • Update VTAcknowledgement public interface to explicitly mark init method as unavailable
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Sep 15, 2017)

    • Improve bundle handling for dynamic frameworks (#55), by Maximilian Landsmann (@landsi)
    • Improve umbrella header for better Swift support (#54), by Marcus Kida (@kimar)
    Source code(tar.gz)
    Source code(zip)
  • 1.2(Oct 21, 2016)

  • 1.1(May 27, 2016)

    • Added tvOS support (#47 #50), by Alex Palman (@alexpalman)
    • Added initWithPath: initializer on VTAcknowledgementsViewController
    • Added initWithFileNamed: convenience initializer on VTAcknowledgementsViewController
    • Deprecated initWithAcknowledgementsPlistPath: on VTAcknowledgementsViewController (use initWithPath instead)
    • Deprecated initWithAcknowledgementsFileNamed: on VTAcknowledgementsViewController (use initWithFileNamed instead)

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 1.0(May 11, 2016)

    • Ready for CocoaPods 1.0.0
    • Update default footer text for CocoaPods 1.0.0
    • Update default CocoaPods URL for CocoaPods 1.0.0
    • Add initWithAcknowledgementsFileNamed: convenience initializer on VTAcknowledgementsViewController

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.17(Dec 7, 2015)

    • Updated imports to compile when modules are disabled (#45), by Ryota Hayashi (@hayashi311)
    • Added VTAcknowledgementsParser to extract the plist parser out of the controller, by Vincent Tourraine (@vtourraine)
    • Independently builds through Xcode (a.k.a. Carthage support), by Vincent Tourraine (@vtourraine)
    • Switched to SFSafariViewController when available for CocoaPods website, by Vincent Tourraine (@vtourraine)
    • Added Dynamic Type support for header and footer labels and acknowledgement text view, by Vincent Tourraine (@vtourraine)

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.16(Nov 18, 2015)

    • Requires Xcode 7
    • Added VTAcknowledgement designated initializer
    • Added generics annotations
    • Improved Swift interoperability (#44), by Stefan Pühringer (@b-ray)
    • Fixed acknowledgement initial scrolling offset (#43), by Levi Brown (@levigroker)

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.15(Sep 2, 2015)

  • 0.14(May 16, 2015)

    • Simplified Chinese localization (#34), by Chihya Tsang (@simpleapples)
    • Added customizable footer text (#32), by Tamás Tímár (@tamastimar)
    • Updated customizable header text to load from acknowledgements file (#32), by Tamás Tímár (@tamastimar)

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.13(Mar 16, 2015)

  • 0.12(Oct 4, 2014)

  • 0.11(May 4, 2014)

    • Portuguese localization (#16), by Michael Brown (@mluisbrown)
    • Spanish localization (#19), by Billy Tobon (@billyto)
    • Danish localization (#22), by Morten Gregersen (@mortengregersen)
    • Improved table view (de)selection (#17), by Philip Kluz (@pkluz)
    • Improved iOS 6 support (#18), by Ben (@bcylin)
    • Improved Storyboards support (#21), by Syo Ikeda (@ikesyo)

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.10(Mar 9, 2014)

    • New headerText property for VTAcknowledgementsViewController (#12 #13), by @maremmle and @macmannes
    • Dutch localization (#13), by @macmannes
    • Swedish localization (#14), by @manucheri
    • Improved Storyboards support (#13), by @macmannes
    • Improved documentation (#15), by @paulfri

    Full Changelog

    Source code(tar.gz)
    Source code(zip)
  • 0.9(Feb 22, 2014)

  • 0.8(Feb 3, 2014)

  • 0.7(Jan 22, 2014)

  • 0.6(Jan 16, 2014)

  • 0.5(Jan 12, 2014)

  • 0.4(Jan 6, 2014)

  • 0.3(Dec 30, 2013)

  • 0.2(Dec 28, 2013)

Owner
Vincent Tourraine
Mobile Developer.
Vincent Tourraine
🏈 Cache CocoaPods for faster rebuild and indexing Xcode project.

?? Cache CocoaPods for faster rebuild and indexing Xcode project.

Vyacheslav Khorkov 489 Jan 6, 2023
A macOS application displaying the thermal, voltage and current sensor values.

Sensors About A macOS application displaying the thermal, voltage and current sensor values. License Project is released under the terms of the MIT Li

Jean-David Gadina 82 Jan 3, 2023
Passing data from a couple of screen into a Model

Passing-Data Passing data from a couple of screen into a Model Introduction Hi, this video is just a representation project from this Video by Essenti

null 0 Oct 12, 2021
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift.

Easy way to detect device environment: Device model and version Screen resolution Interface orientation iOS version Battery state Environment Helps to

Anatoliy Voropay 582 Dec 25, 2022
iOS ReplayKit Screen Share Broadcast Extension Frame Sharing

An iOS app that demonstrates how we can share CMSampleBuffer frames from SampleHandler of Broadcast Extension to the host app and how to pass callbacks to and fro from host app to SampleHandler and vice versa.

IOTric 5 Oct 15, 2022
AnimeListSwiftUI - Anime quote list built with MVVM Swift 5 using Async/Await

How To In SwiftUI Async/Await AnimeListSwiftUI - Anime quote list built with MVVM Swift 5 using Async/Await Clones Clubhouse - App clone built with Sw

Rogério Toledo 3 Nov 2, 2022
Home Assistant uses Bundler, Homebrew and Cocoapods to manage build dependencies

Home Assistant for Apple Platforms Getting Started Home Assistant uses Bundler, Homebrew and Cocoapods to manage build dependencies. You'll need Xcode

Home Assistant 1.1k Jan 8, 2023
Generate a list of licenses for the Swift Package libraries that your app depends on.

LicenseList Generate a list of licenses for the Swift Package libraries that your app depends on. Example Requirements Written in Swift 5 Compatible w

Cybozu 40 Dec 19, 2022
Simple iOS Application built using UIKit displaying the list of Cryptocurrencies and a detailed screen with a line graph.

CryptoViewer Simple iOS Application built using UIKit displaying the list of Cryptocurrencies and a detailed screen with a line graph. Home Screen: Di

null 0 Jun 14, 2022
This "Calculator" application is a simple one screen design of calculator screen i have made this single screen design application just to practice AutoLayout concepts.

Calculator Layout This "Calculator" application is a simple one screen design of calculator screen i have made this single screen design application j

Chetan Parate 1 Oct 29, 2021
AcknowledgementsPlist manages the licenses of libraries that depend on your iOS app.

What's AcknowledgementsPlist AcknowledgementsPlist that combines licenses of Carthage, CocoaPods, and Manual Plist into Bundle and Plist. I implement

CATS Open Source Softwares 75 Nov 3, 2022
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

João Mourato 54 Apr 6, 2022
Example repo for reproduction of a cocoapods bug

CocoapodsBugExample Run a pod install with use_frameworks! un-commented, see how Pods/CoreDataPodSample compile sources includes CoreDataPodSample.xcd

null 0 Nov 3, 2021
A command-line tool to generate a JSON-list of all used SPM-dependencies of an Xcode-project.

SwiftPackageList A command-line tool to generate a JSON-list of all used SPM-dependencies of an Xcode-project. This includes all the Package.resolved

Felix Herrmann 14 Jan 8, 2023
A iOS SwiftUI framework for displaying data from an api inside a List.

FeedListKit FeedListKit is a high level framework for representing data from an Api inside a SwiftUi List. It automatically handles refreshing and loa

Knoggl 3 Nov 2, 2022
🏈 Cache CocoaPods for faster rebuild and indexing Xcode project.

?? Cache CocoaPods for faster rebuild and indexing Xcode project.

Vyacheslav Khorkov 489 Jan 6, 2023
Integrate third party libraries by using Cocoapods and Swift Package Manager, store data in the cloud using Firebase Firestore.

Integrate third party libraries by using Cocoapods and Swift Package Manager, store data in the cloud using Firebase Firestore. Exercising query and s

WEI 0 Dec 19, 2021
Test task application based on Swift using CoreData, Alamofire, AlamofireImage and CocoaPods

iTunes Search Test task application based on Swift using CoreData, Alamofire, AlamofireImage and CocoaPods Features ?? Searching music albums by name

Alexander Zhukov 0 Oct 31, 2021
🏈 Cache CocoaPods for faster rebuild and indexing Xcode project.

Motivation Working on a project with a huge amount of pods I had some troubles: - Slow and unnecessary indexing of pods targets, which implementation

Vyacheslav Khorkov 487 Jan 5, 2023
CocoaPods dynamic framework issue

CocoaPods dynamic framework issue This small PoC should show an issue I experien

Alexander Weiß 0 Dec 29, 2021