From dbff012dc8eb2a13d4d6ee4cf8b5571bbb251ef6 Mon Sep 17 00:00:00 2001 From: Brandon Evans Date: Sun, 27 Dec 2020 11:26:02 -0700 Subject: [PATCH] Use copyright value from Info.plist in about window --- Xcodes/Backend/Bundle+InfoPlistValues.swift | 4 ++++ Xcodes/Frontend/About/AboutView.swift | 2 +- Xcodes/Resources/Info.plist | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Xcodes/Backend/Bundle+InfoPlistValues.swift b/Xcodes/Backend/Bundle+InfoPlistValues.swift index 0838bc5..115631b 100644 --- a/Xcodes/Backend/Bundle+InfoPlistValues.swift +++ b/Xcodes/Backend/Bundle+InfoPlistValues.swift @@ -12,4 +12,8 @@ extension Bundle { var version: String? { infoDictionary?["CFBundleVersion"] as? String } + + var humanReadableCopyright: String? { + infoDictionary?["NSHumanReadableCopyright"] as? String + } } diff --git a/Xcodes/Frontend/About/AboutView.swift b/Xcodes/Frontend/About/AboutView.swift index e4a1136..d463f42 100644 --- a/Xcodes/Frontend/About/AboutView.swift +++ b/Xcodes/Frontend/About/AboutView.swift @@ -30,7 +30,7 @@ struct AboutView: View { .buttonStyle(LinkButtonStyle()) } - Text("Copyright © 2020 Robots and Pencils") + Text(Bundle.main.humanReadableCopyright!) .font(.footnote) } } diff --git a/Xcodes/Resources/Info.plist b/Xcodes/Resources/Info.plist index 661015d..0d3bfc9 100644 --- a/Xcodes/Resources/Info.plist +++ b/Xcodes/Resources/Info.plist @@ -23,7 +23,7 @@ LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright - Copyright © 2020 Robots and Pencils. All rights reserved. + Copyright © 2020 Robots and Pencils. NSPrincipalClass NSApplication NSSupportsAutomaticTermination @@ -33,9 +33,9 @@ SMPrivilegedExecutables com.robotsandpencils.XcodesApp.Helper - identifier "com.robotsandpencils.XcodesApp.Helper" and info [CFBundleShortVersionString] >= "1.0.0" and anchor apple generic and certificate leaf[subject.OU] = "$(CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT)" + identifier "com.robotsandpencils.XcodesApp.Helper" and info [CFBundleShortVersionString] >= "1.0.0" and anchor apple generic and certificate leaf[subject.OU] = "$(CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT)" - CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT - $(CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT) + CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT + $(CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT)