Code Monkey home page Code Monkey logo

acknowlist's People

Contributors

azhang66 avatar basthomas avatar danielriege avatar gerbiljames avatar honkmaster avatar idevelopper avatar jishidaaaaa avatar kieranharper avatar lukemmtt avatar mattcroxson-csn avatar melle avatar mortengregersen avatar naoty avatar oliverziegler avatar oscargorog avatar vtourraine avatar wooder avatar yoonhg84 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acknowlist's Issues

Thoughts on handling special licenses

Howdy,

Thanks for this super useful tool! I just started using it and it's super helpful. One issue (not with your project) but when using GooglePlacePicker pod and a few other Google pods they actually have this weird license

simulator screen shot jun 29 2017 2 21 44 pm

I was wondering if you had any thoughts on how to best handle this? My thought is to subclass AcknowListViewController and override func commonInit(acknowledgementsPlistPath: String?) { then look specifically for these special license requirements.

Would you be interested in having something that handles these special licenses by letting the AcknowParser take a list of overrides for ["pod name": some closure that returns a string]? Totally fine if you don't want to add that complexity.

Cheers!

Compile Error

From AcknowList 1.3, there is a compile issue on Xcode 9 with swift 3.2. It works fine on 1.2.

(directory)/Pods/AcknowList/Source/AcknowListViewController.swift:344:163: Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'

1.1 violates semantic versioning

Thanks for being so quick to upgrade to Swift 3.0! With the risk of sounding ungrateful semantic versioning (which CocoaPods uses) dictates no breaking changes in minor version increments so the way I see it 1.1 should really be 2.0 so people don't get attacked by compile errors when running pod update.

http://semver.org

Header/Footer Breaks in Xcode 12/iOS 14

In Xcode Version 12.0 (12A7208) & iOS 14, the header and footer views, which should expand to the display size width, now do not format correctly. This is regardless of setting them in code or in the .plist.

TY in advance for looking at this, we love AcknowList! :)

Screen Shot 2020-09-16 at 1 27 00 PM

Acknowledgement details not "scrollable" on tvOS

I've found following bug on tvOS 13 (maybe also earlier versions):

"Acknowledgement Details" are not scrollable if the length of the "FooterText" in Pods-acknowledgement.plist exceeds the screen height.

Reproduce:

  • Open the "AcknowExampleTV"-Xcode-Project
  • Open Pods-acknowledgement.plist and duplicate the content of "Item1"->"FooterText"
  • Start the app and try to scroll the content of the Acknowledgement

Text spacing bug on iPads

Following commit cf5c82d, there is an issue displaying certain acknowledgements on iPads. With the exception of AcknowList's own license, all of my Pods are affected by this issue (see below pictures for an example with Alamofire). This did not occur in v1.6.0, so I believe it is a regression caused by cf5c82d.

EDIT: cf5c82d turned out to not be the problem. The problem was actually due to premature newlines. I've written a PR to fix this here: #43

acknowlist correct

alamofire incorrect

Dependency licenses are not displaying

I'm using SwiftUI and presenting the AcknowListSwiftUIView, init'd with AcknowParser.defaultPackages() to load my Package.resolved file.

When I run my app, my NavigationLink successfully presents the AcknowListSwiftUIView, showing a scrolling list of all of the app's dependencies. When I select one, the app navigates to a new screen that shows the dependency's name at the top, but the rest of the view is empty instead of showing the library license.

I'm having the same experience on both iOS 16.0 and tvOS 16.0 (physical device and simulator)

Assertion failure in iOS 15

Using:

let viewController = AcknowListViewController()
navigationController?.pushViewController(viewController, animated: true)

On Xcode 13 RC (Version 13.0 (13A233)) ->

On Simulator iOS 14.5 -> expected behavior (AcknowList viewController shows)

On Simulator iOS 15.0:

2021-09-15 00:12:36.534344-0400 <project>16143:173446] *** Assertion failure in UITraitCollection *UIViewControllerMissingInitialTraitCollection(UIViewController *__strong)(), UIViewController.m:2434
2021-09-15 00:12:36.559665-0400 <project>[16143:173446] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIViewController is missing its initial trait collection populated during initialization. This is a serious bug, likely caused by accessing properties or methods on the view controller before calling a UIViewController initializer. View controller: <UITableViewController: 0x7fe893379490>'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000011fbdebb4 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x0000000119b76be7 objc_exception_throw + 48
	2   Foundation                          0x0000000114a59da9 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
	3   UIKitCore                           0x00000001347fb6c6 UIViewControllerMissingInitialTraitCollection + 188
	4   UIKitCore                           0x00000001347ffbef -[UIViewController traitCollection] + 155
	5   UIKitCore                           0x00000001347ee93a -[UITableViewController dealloc] + 196
	6   AcknowList                          0x000000010f532a7e $s10AcknowList0aB14ViewControllerC9plistPath5styleACSS_So07UITableC5StyleVtcfc + 206
	7   AcknowList                          0x000000010f532b0b $s10AcknowList0aB14ViewControllerC9plistPath5styleACSS_So07UITableC5StyleVtcfcTo + 59
	8   AcknowList                          0x000000010f532615 $s10AcknowList0aB14ViewControllerCACycfc + 325
	9   AcknowList                          0x000000010f5326bf $s10AcknowList0aB14ViewControllerCACycfcTo + 15
	10  AcknowList                          0x000000010f5324cb $s10AcknowList0aB14ViewControllerCACycfC + 27
	11  <project>                          0x000000010911ad79 $s9<project>19ViewControllerLegalC13ackListActionyyypF + 153
	12  <project>                           0x000000010911ceb1 $s9<project>19ViewControllerLegalC13ackListActionyyypFTo + 65
	13  UIKitCore                           0x0000000134fc2189 -[UIApplication sendAction:to:from:forEvent:] + 83
	14  UIKitCore                           0x000000013485b573 -[UIControl sendAction:to:forEvent:] + 110
	15  UIKitCore                           0x000000013485b955 -[UIControl _sendActionsForEvents:withEvent:] + 332
	16  UIKitCore                           0x0000000134857e8c -[UIButton _sendActionsForEvents:withEvent:] + 148
	17  UIKitCore                           0x000000013485a206 -[UIControl touchesEnded:withEvent:] + 488
	18  UIKitCore                           0x000000013500295d -[UIWindow _sendTouchesForEvent:] + 1287
	19  UIKitCore                           0x00000001350049df -[UIWindow sendEvent:] + 5295
	20  UIKitCore                           0x0000000134fdb4e8 -[UIApplication sendEvent:] + 825
	21  UIKitCore                           0x000000013507128a __dispatchPreprocessedEventFromEventQueue + 8695
	22  UIKitCore                           0x0000000135073a10 __processEventQueue + 8579
	23  UIKitCore                           0x000000013506a1b6 __eventFetcherSourceCallback + 240
	24  CoreFoundation                      0x000000011fb4ce25 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	25  CoreFoundation                      0x000000011fb4cd1d __CFRunLoopDoSource0 + 180
	26  CoreFoundation                      0x000000011fb4c1f2 __CFRunLoopDoSources0 + 242
	27  CoreFoundation                      0x000000011fb46951 __CFRunLoopRun + 875
	28  CoreFoundation                      0x000000011fb46103 CFRunLoopRunSpecific + 567
	29  GraphicsServices                    0x000000012131fcd3 GSEventRunModal + 139
	30  UIKitCore                           0x0000000134fbbe63 -[UIApplication _run] + 928
	31  UIKitCore                           0x0000000134fc0a53 UIApplicationMain + 101
	32  <project>                           0x000000010908a14f main + 63
	33  dyld                                0x000000010ea60e1e start_sim + 10
	34  ???                                 0x0000000000000001 0x0 + 1
	35  ???                                 0x0000000000000002 0x0 + 2

Same codeline, just an error on iOS 15...

Any ideas? ty in advance. AcknowList is awesome btw!

How to filter acknowledgements by its type

I previously sent a pull request (#17). But, I wonder how I should filter acknowledgements by its type.

In my opinion, AcknowListViewController's acknowledgements property should be public or AcknowListViewController should provide methods to filter by them.

What do you think?

Customisation of cells on AcknowListViewController

I've had a think about this one and I'm just not sure about how to do it. I tried subclassing UITableViewCell and using UIAppearance but for some reason UITableViewCells dont support it for most of their properties.

One way of offering this would be to provide a UITableViewCell subclass (AcknowCell) which has a customisation function which can be overridden. My issue with this is how should AcknowListViewController be told to use a custom cell implementation. I don't think we should add any new parameters to the constructors but it would be possible to add a property to AcknowListViewController which specifies which cell class it should use.

What do you think?

Example Issue

dyld: Library not loaded: @rpath/AcknowList.framework/AcknowList
Referenced from: /var/containers/Bundle/Application/1D2D6165-1423-4932-BC3E-FE878D989929/AcknowExample.app/AcknowExample
Reason: image not found

Possibility to provide own localization

The latest AcknowList update changed my navigationItem title to "Danksagungen" for German localization. This translation is not completely wrong but you would often use another word (like "Lizenzen" what equals "licences")

I would prefer to provide my own localization.

Suggestions:

  • Give possibility to ship a custom .strings file
    or
  • Provide public properties to set the title

No licences

I installed AcknowList from pods using pod 'AcknowList' and I created a reference between Pods-bundle name-acknowledgements.plist and my main target.

In Pods/TargetSupportFiles/Pods/Pods-bundle name-acknowledgements.plist I can see, there is no data (empty file), but in Pods-Itaka-acknowledgements.markdown I can see all licences which I need. How can I fix it?

It is the way, how I create ViewController

let path = Bundle.main.path(forResource: "Pods-bundle name-acknowledgements", ofType: "plist") let licenceVC = AcknowListViewController(acknowledgementsPlistPath: path)

Licenses do not show up in AcknowListViewController

Hello 👋 I'm trying to show the licenses of OSS libraries I use on my project using AcknowList and I can't. I followed every step on the README. I'm using version 1.2.1 of AcknowList since many of the pods I'm using aren't migrated to 4.0.

1. I moved the appropriate file as a reference into my project:

screen shot 2018-07-12 at 00 03 16

2. I created the VC etc

        if indexPath.section == 2 {
            switch indexPath.row {
            case 0:
                let viewController = AcknowListViewController()
                navigationController?.pushViewController(viewController, animated: true)
            default:
                break
            }
        }

3. When I land on the screen I get this as a result:

screen shot 2018-07-12 at 00 10 57

and I get that as an error message:

** AcknowList Warning **
No acknowledgments found.
This probably means that you didn’t import the `Pods-acknowledgements.plist` to your main target.

I really can't understand why I get this error since I followed every step on the README. 🤔

Any ideas what may be wrong would be more than appreciated.

Notes:

  • I'm using a single target so I don't do anything fancy in that area

cc: @vtourraine

does not contain bitcode. You must rebuild it with bitcode enabled

I added the library with success, but when trying to archive the app for distribution, I am getting this error:

:-1: '/Users/alouanemed/Library/Developer/Xcode/DerivedData/app-hcgydxapjqidfmaldslmgpvdjrff/Build/Intermediates.noindex/ArchiveIntermediates/App Beta/BuildProductsPath/Release-iphoneos/AcknowList/AcknowList.framework/AcknowList' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/alouanemed/Library/Developer/Xcode/DerivedData/app-hcgydxapjqidfmaldslmgpvdjrff/Build/Intermediates.noindex/ArchiveIntermediates/App Beta/BuildProductsPath/Release-iphoneos/AcknowList/AcknowList.framework/AcknowList' for architecture arm64

iPhone X support

The AcknowViewController view is cropped on the iPhone X in landscape mode. We need to update the layout to accommodate the “safe area” frame.

screen shot 2017-09-13 at 16 47 37

Plist via SPM

Hi,

I don't believe the SPM will be creating a plist from what I can see, unlike cocoa pods.

Would this need to be created manually ?

This would be an implementation with swiftui.

Thanks in advance,

Jules.

'NSInternalInconsistencyException' on iOS 15.2

I added AcknowList to my project probably in iOS 13, and have never touched it since. But recently I checked the app and it seems that in iOS 15 I get the following exception:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] instantiated view controller with identifier "UIViewController-0H5-Tf-yWq" from storyboard "Main", but didn't get a UITableView.' terminating with uncaught exception of type NSException CoreSimulator 783.5 - Device: iPhone 13 - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone 13

Now the problem is, that since I changed nothing, I have no idea where this error comes from.

Dark mode support

Some colors are hardcoded in AcknowList, e.g.

view.backgroundColor = UIColor.white

in AcknowViewController. This does not look good in iOS 13.
Here, it should be something as

view.backgroundColor = UIColor.systemBackground

Same applies for all label colors etc. Thus, an update for Dark mode is required.

SwiftPM usage has docc included in build files

I get the error

AcknowList
found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/xxx/Library/Developer/Xcode/DerivedData/xxx/SourcePackages/checkouts/AcknowList/Sources/AcknowList/AcknowList.docc

It seems that the docc needs to be explicitly removed from the SwiftPM package or marked as not a build file.

Unrecognised selector

When tapping on TableFooter, my app crashes with following output:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AcknowList.AcknowListViewController openCocoaPodsWebsite]: unrecognized selector sent to instance 0x7fc56aceaf80'

I think the line

let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: "openCocoaPodsWebsite")

should be

let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: "openCocoaPodsWebsite:")

to prevent crashing.

SwiftUI Views not included in latest Release

I figured I had to use the master branch to use the SwiftUI View. Since the README referenced the SwiftUI Views I was under the conception I just copy the repo url and punch it in Xcode but that didn't work which is totally fine and I am happy with the tool (❤️) but I wanted to raise it here nonetheless

How to include licenses of Swift packages

Hey there,

not sure if I just missed it in the docs... is there any way of automatically including the used swift packages as well.

In my App, I have only 2 dependencies left on Cocoapods while the rest are migrated to SPM. Would be great if it was somehow possible to mix both.

Cheers

First lines of license appear below navigation bar

The first two lines of text will appear below the navigation bar when pushing in the AcknowViewController controller. This could be solved by using isTranslucent false on the navigation bar, but a better solution would be to use auto-layout in the AcknowViewController.

screen shot 2018-10-05 at 08 59 41

screen shot 2018-10-05 at 08 59 55

screen shot 2018-10-05 at 09 00 16

AcknowList is not supported by Xcode 8 (Swift 2.3 required)

Xcode 8 only supports development in projects with Swift 2.3 or Swift 3.0. As AcknowList is build with Swift 2.2 it can currently not be used in Xcode 8. A syntax update can be done automatically and would be greatly appreciated. How is your opinion?

AcknowList 2.1.1 not working in a pure SPM project

My project is not using CocoaPods (so I do NOT have a .xcworkspace file), all third party frameworks are added from SPM. And I strictly followed the installation instructions for SPM:

  1. Click on File → Add Packages….
  2. Enter https://github.com/vtourraine/AcknowList.
  3. Select the version you’d like to use.
  4. Add the Package.resolved file generated by Xcode to your main target: drag and drop the file from the [appName].xcodeproj/project.xcworkspace/xcshareddata/swiftpm/ folder to your Xcode project (don’t copy the file, leave Copy items if needed unchecked).

I drag & dropped Package.resolved to my project (did not copy item as the instructions suggest)
image

And it is checked for my main target:
image

And my usage:

    func showAcknowList() {
        let vc = AcknowListViewController()
        navigationController.present(vc, animated: true)
    }

Then in the console log I saw

No acknowledgements found.
This probably means that you didn’t import the Pods-acknowledgements.plist to your main target.

I tried with other initializer such as init(plistPath: String) & init(fileNamed: String) but I got no luck. I briefly checked the source code for these initializers, and it seems they are all looking for a file with ".plist" extension instead of "Package.resolved".

Also it seems the initializer init(plistFileURL: URL) documented in README is no longer available.

I am using AcknowList 2.1.1
image

Did I miss any step? How can I make AcknowList work with SPM?

Incorrect sorting when combining plist with custom entries

I discovered a problem when you combine Cocoapods plist with additional entries.

let viewController = AcknowListViewController(fileNamed: "file")

// Add a special entry
let someLicenseThatsNotInCocoapods = Acknow(title: "Foo", text: "baz")
vc.acknowledgements.append(someLicenseThatsNotInCocoapods)

navigationController.pushViewController(viewController, animated: true)

This does not work out so great, as Foo will always be appended to the end of the list, and you expect them to be sorted. I use this as workaround:

let viewController = AcknowListViewController(fileNamed: "file")

// Add a special entry
let someLicenseThatsNotInCocoapods = Acknow(title: "Foo", text: "baz")
vc.acknowledgements.append(someLicenseThatsNotInCocoapods)

// Sort entries (stolen from load() )
vc.acknowledgements = vc.acknowledgements.sorted(by: {
            (ack1: Acknow, ack2: Acknow) -> Bool in
            let result = ack1.title.compare(ack2.title, options: [], range: nil, locale: Locale.current)
            return (result == ComparisonResult.orderedAscending)
})
navigationController.pushViewController(viewController, animated: true)

It could be solved in a number of ways, perhaps more initialisers with customAcknowledgements: [Acknow] as argument, or just sort the entries in didSet of AcknowListViewController.acknowledgements.

tvOS support

Hi,

I was trying to use AcknowList with tvOS, similar to VTAcknowledgementsViewController. However, it does not work :):

[!] The platform of the target `redacted` (tvOS 11.0) is not compatible with `AcknowList (1.5)`, which does not support `tvos`.

Is this just a CocoaPods or a repository/source issue?

Best

SwiftUI

How should we update this library to offer a SwiftUI interface?

  • Is it better to offer it as a new option, or create a distinct library?
  • Do we need to update the model for a Combine API?

Any ideas and suggestions are welcome!

Subclass?

I've been trying to subclass AcknowListViewController so I can customize the textLabel appearance in the cellForRowAtIndexPath method. Unfortunately, I can't seem to get past the must call designated initializer method error. I've tried calling / overriding every combination of init method I can think of. Is there any way to subclass this? I can't think of any other way to get to the table view cell.

SwiftUIView is not available on v2.0.3

I installed the library via CocoaPods and could not use AcknowListSwiftUIView. Compiler said Cannot find 'AcknowListSwiftUIView' in scope when I tried to initialize like let view = AcknowListSwiftUIView() .

And I found that there are no files of SwiftUI classes in the v2.0.3 release zip.

Could I ask how I can use it for SwiftUI?

Exclude a pod

Hi. How do exclude a pod and not show up in the Pods-acknowledgements.plist?

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.