"Like I mentioned above I adapted the same approach which is already used for AppInformationHelp with a Model and ModelData for static strings. But as of now whenever a new dependency is added we have to maintain both places manually:
I can think of a more generic approach to display the licensing info by reading the content of THIRD-PARTY-NOTICES directly but this requires restructuring this file (e.g. JSON or PList). Going one step further, I can think of adding this (and maybe a license check) step to CI so that each build gets an updated and accurate content for THIRD-PARTY-NOTICES file."
_Originally posted by @frnkschmtt in https://github.com/corona-warn-app/cwa-app-ios/pull/111#issuecomment-638419059_
A build step in Xcode would also be sufficient instead of adding it to the CI pipeline.
I would like to tackle this.
Is there any requirement regarding the format and structure of THIRD-PARTY-NOTICES?
Currently human-readability is quite good but not very suitable for common ways of parsing.
How about having one parsable file pithing the project, generated both the in-app screen, as well as the human-readable file for GitHub? The current readable format should not be disguised in any form.
@inf2381 What's your take on this?
I like the current structure of the legal screen. Would it be possible to have the sam structure in THIRD-PARTY-NOTICES? And then create that file based on the content of Package.resolved
I like the current structure of the legal screen. Would it be possible to have the sam structure in THIRD-PARTY-NOTICES? And then create that file based on the content of Package.resolved
Good idea but unfortunately the Package.resolved file doesn't include any license info about the used dependencies.
I will start working on this issue and come up with a proposal for a central parsable file which can be used for both the THIRD-PARTY-NOTICES and the legal info screen.
Hey @frnkschmtt, the underlying view controllers for the App Information screens were refactored to adopt the DynamicTableViewController. Please have a look at this PR: https://github.com/corona-warn-app/cwa-app-ios/pull/246
Hey @frnkschmtt, do you have any progress on this you could share with us?
I created a PR (#362 ) that contains a fastlane action to generate the THIRD-PARTY-NOTICES and swift models based on a new json file. Maybe this is useful for this issue :)
Hi @dfelber. Thanks for your contribution! As @frnkschmtt already commented that he would tackle this (sorry for not assigning you), could you two please sync here before we accept a PR?
@inf2381 sure!
@frnkschmtt I guess you are already done with your implementation, so mine might be superfluous?
But what do you think about updating the "full license" texts based on a url to the actual license in the repositories? Currently you have to add and reformat the licenses by hand which is not a pleasant job. (See different line breaks in the app and in THIRD-PARTY-NOTICES)
Well, I still think it is a valid approach handling this via CI. So I am totally fine if we use your implementation, especially since I am having an issue with PListBuddy (see my pull request for details).
During my implementation I had the same idea fetching the full license via curl. But it turned out that not every dependency is hosted on GitHub, where it is common practice to have a dedicated license file (in our case the SQLCipher dependency).
SQLCipher is actually on GitHub (https://github.com/sqlcipher/sqlcipher) :)
But I see the problem if there would not bet a license url available...
If there would be enough time I would suggest following (for a future enhancement):
Most helpful comment
Good idea but unfortunately the Package.resolved file doesn't include any license info about the used dependencies.
I will start working on this issue and come up with a proposal for a central parsable file which can be used for both the THIRD-PARTY-NOTICES and the legal info screen.