vtourraine / acknowlist Goto Github PK
View Code? Open in Web Editor NEWAcknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
License: MIT License
Acknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
License: MIT License
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
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!
This is a great tool!
But I think it's cool to have the list to come in csv format. This is for reporting purposes.
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'
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.
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:
Pods-acknowledgement.plist
and duplicate the content of "Item1"->"FooterText"How do you do that? Asking for a friend.
🤷 😅
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
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)
let ack = Acknow(title: "ABC", text: "ABC", license: "ABC")
gives the error:
'Acknow' initializer is inaccessible due to 'internal' protection level
Using v1.2
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!
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?
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 UITableViewCell
s 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?
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
What about Cocoapods?
Unsure if this is possible or not, but it’d be great if Acknow
had a let isDevelopmentPod: Bool
property on it, to allow development pods to be more easily filtered out.
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:
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)
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:
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:
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:
cc: @vtourraine
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
Why the default header label is not localized?
Is there any support coming for Xcode 11's new "Swift Package Manager"?
Thanks
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.
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.
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.
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.
New syntax for selectors with Swift 2.2 / Xcode 7.3.
See: https://github.com/apple/swift-evolution/blob/master/proposals/0022-objc-selectors.md
Is there a way to change the title to some other strings?
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.
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 can we include the existing localization Bundle with SPM?
Please update for Swift 5 support
Thanks!
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
Should we switch to the default Swift Package Manager structure (Sources
, Tests
, one folder by target, etc)?
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?
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:
I drag & dropped Package.resolved
to my project (did not copy item as the instructions suggest)
And it is checked for my main target:
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 thePods-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.
Did I miss any step? How can I make AcknowList work with SPM?
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
.
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
How should we update this library to offer a SwiftUI interface?
Any ideas and suggestions are welcome!
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.
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?
We should update the Package definition to include the existing unit test target, including the associated plist
and txt
files as resources.
Hi. How do exclude a pod and not show up in the Pods-acknowledgements.plist?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.