From 533bfc41c54ef42c681ec8253ea39c0a413e58bf Mon Sep 17 00:00:00 2001 From: James Power Date: Sat, 14 Mar 2026 09:26:35 -0400 Subject: [PATCH 1/3] Add TestFlight beta badge to README. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 917a8ee..0f6082e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Swift](https://img.shields.io/badge/Swift-6.2-orange)](https://swift.org) [![Platform](https://img.shields.io/badge/platform-iOS%2026-blue)](https://developer.apple.com/ios/) [![Platform](https://img.shields.io/badge/platform-visionOS%2026-blue)](https://developer.apple.com/visionos/) +[![TestFlight](https://img.shields.io/badge/TestFlight-Join%20Beta-blue?logo=apple)](https://testflight.apple.com/join/Tj85E2kU) ![It's dangerous!](https://img.shields.io/badge/You_are_likely_to_be_eaten_by_a-grue-red.svg) [![Take this.](https://img.shields.io/badge/get-lamp-yellow.svg)](http://getlamp.com) From 297bd578066d02daa0609ab825bc8e706476338b Mon Sep 17 00:00:00 2001 From: James Power Date: Sat, 14 Mar 2026 13:47:36 -0400 Subject: [PATCH 2/3] Replace VTAcknowledgementsViewController with SwiftUI acknowledgements view. --- .swiftlint.yml | 5 +- Project.swift | 3 - .../VTAcknowledgementsViewController/LICENSE | 19 - .../Package.swift | 17 - .../da.lproj/Localizable.strings | 2 - .../de.lproj/Localizable.strings | 2 - .../en.lproj/Localizable.strings | 2 - .../es.lproj/Localizable.strings | 2 - .../fr.lproj/Localizable.strings | 2 - .../it.lproj/Localizable.strings | 2 - .../ja.lproj/Localizable.strings | 2 - .../nl.lproj/Localizable.strings | 2 - .../pt.lproj/Localizable.strings | 2 - .../sv.lproj/Localizable.strings | 2 - .../zh-Hans.lproj/Localizable.strings | 2 - .../zh-Hant.lproj/Localizable.strings | 2 - .../Sources/VTAcknowledgement.h | 41 -- .../Sources/VTAcknowledgement.m | 29 -- .../Sources/VTAcknowledgementViewController.h | 47 --- .../Sources/VTAcknowledgementViewController.m | 61 --- .../VTAcknowledgementsViewController.h | 96 ----- .../VTAcknowledgementsViewController.m | 357 ----------------- .../Sources/include/VTAcknowledgement.h | 41 -- .../include/VTAcknowledgementViewController.h | 47 --- .../VTAcknowledgementsViewController.h | 96 ----- .../Settings/AcknowledgementsView.swift | 358 ++++++++++++++++++ .../Settings/SSAdvSettingsController.m | 12 +- .../Pods-acknowledgements.plist | 316 ---------------- .../en.lproj/Localizable.strings | 1 + .../fr.lproj/Localizable.strings | 1 + .../it.lproj/Localizable.strings | 1 + 31 files changed, 365 insertions(+), 1207 deletions(-) delete mode 100644 Vendored/VTAcknowledgementsViewController/LICENSE delete mode 100644 Vendored/VTAcknowledgementsViewController/Package.swift delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/da.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/de.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/en.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/es.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/fr.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/it.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/ja.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/nl.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/pt.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/sv.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hans.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hant.lproj/Localizable.strings delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.h delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.m delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.h delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.m delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.h delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.m delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgement.h delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementViewController.h delete mode 100644 Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementsViewController.h create mode 100644 src/Mudrammer/Controllers/Settings/AcknowledgementsView.swift delete mode 100644 src/Mudrammer/Supporting Files/Pods-acknowledgements.plist diff --git a/.swiftlint.yml b/.swiftlint.yml index 4e53f13..f806e01 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -8,6 +8,7 @@ excluded: disabled_rules: - redundant_objc_attribute - type_body_length + - line_length opt_in_rules: - trailing_comma @@ -18,10 +19,6 @@ trailing_comma: identifier_name: min_length: 1 -line_length: - warning: 150 - error: 200 - file_length: warning: 500 error: 1000 diff --git a/Project.swift b/Project.swift index a39c0d4..9402e7a 100644 --- a/Project.swift +++ b/Project.swift @@ -23,7 +23,6 @@ let project = Project( .local(path: "Vendored/JSQSystemSoundPlayer"), .local(path: "Vendored/DAKeyboardControl"), .local(path: "Vendored/JTSImageViewController"), - .local(path: "Vendored/VTAcknowledgementsViewController"), .local(path: "Vendored/QuickDialog"), .local(path: "Vendored/FXForms"), .local(path: "Vendored/SPLCore"), @@ -119,7 +118,6 @@ let project = Project( "src/Mudrammer/Supporting Files/it.lproj/**", "src/Mudrammer/Images.xcassets", "src/Mudrammer/Supporting Files/LaunchScreen.storyboard", - "src/Mudrammer/Supporting Files/Pods-acknowledgements.plist", ], entitlements: "src/Mudrammer/Supporting Files/MUDRammer.entitlements", dependencies: [ @@ -134,7 +132,6 @@ let project = Project( .package(product: "JSQSystemSoundPlayer"), .package(product: "DAKeyboardControl"), .package(product: "JTSImageViewController"), - .package(product: "VTAcknowledgementsViewController"), .package(product: "QuickDialog"), .package(product: "FXForms"), .package(product: "SPLCore"), diff --git a/Vendored/VTAcknowledgementsViewController/LICENSE b/Vendored/VTAcknowledgementsViewController/LICENSE deleted file mode 100644 index b12fb5b..0000000 --- a/Vendored/VTAcknowledgementsViewController/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Vendored/VTAcknowledgementsViewController/Package.swift b/Vendored/VTAcknowledgementsViewController/Package.swift deleted file mode 100644 index 1e35998..0000000 --- a/Vendored/VTAcknowledgementsViewController/Package.swift +++ /dev/null @@ -1,17 +0,0 @@ -// swift-tools-version: 6.2 -import PackageDescription -let package = Package( - name: "VTAcknowledgementsViewController", - defaultLocalization: "en", - platforms: [.iOS(.v26), .visionOS(.v26)], - products: [.library(name: "VTAcknowledgementsViewController", targets: ["VTAcknowledgementsViewController"])], - targets: [ - .target( - name: "VTAcknowledgementsViewController", - path: "Sources", - resources: [.process("Resources")], - publicHeadersPath: "include", - cSettings: [.unsafeFlags(["-Wmost"])] - ) - ] -) diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/da.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/da.lproj/Localizable.strings deleted file mode 100644 index 1d8c485..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/da.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Tak til"; -"VTAckGeneratedByCocoaPods" = "Genereret af CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/de.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/de.lproj/Localizable.strings deleted file mode 100644 index 5b0197d..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/de.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Danksagungen"; -"VTAckGeneratedByCocoaPods" = "Generiert mit CocoaPods"; diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/en.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/en.lproj/Localizable.strings deleted file mode 100644 index 3454ce1..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/en.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Acknowledgements"; -"VTAckGeneratedByCocoaPods" = "Generated by CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/es.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/es.lproj/Localizable.strings deleted file mode 100644 index 20b0fea..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/es.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Agradecimientos"; -"VTAckGeneratedByCocoaPods" = "Generado por CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/fr.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/fr.lproj/Localizable.strings deleted file mode 100644 index a94369c..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/fr.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Remerciements"; -"VTAckGeneratedByCocoaPods" = "Généré par CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/it.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/it.lproj/Localizable.strings deleted file mode 100644 index 1253991..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/it.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Ringraziamenti"; -"VTAckGeneratedByCocoaPods" = "Generato tramite CocoaPods"; diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/ja.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/ja.lproj/Localizable.strings deleted file mode 100644 index d5bc9ef..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/ja.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "謝辞"; -"VTAckGeneratedByCocoaPods" = "Generated by CocoaPods"; diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/nl.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/nl.lproj/Localizable.strings deleted file mode 100644 index 0397fc3..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/nl.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Verantwoordingen"; -"VTAckGeneratedByCocoaPods" = "Gegenereerd door CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/pt.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/pt.lproj/Localizable.strings deleted file mode 100644 index ca44b47..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/pt.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Agradecimentos"; -"VTAckGeneratedByCocoaPods" = "Gerado por CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/sv.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/sv.lproj/Localizable.strings deleted file mode 100644 index 6597362..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/sv.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "Erkännanden"; -"VTAckGeneratedByCocoaPods" = "Genererad av CocoaPods"; \ No newline at end of file diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hans.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hans.lproj/Localizable.strings deleted file mode 100644 index cbd14ba..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hans.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "致谢"; -"VTAckGeneratedByCocoaPods" = "使用 CocoaPods 生成"; diff --git a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hant.lproj/Localizable.strings b/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hant.lproj/Localizable.strings deleted file mode 100644 index f91a763..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/Resources/VTAcknowledgementsViewController.bundle/zh-Hant.lproj/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"VTAckAcknowledgements" = "致謝"; -"VTAckGeneratedByCocoaPods" = "使用 CocoaPods 管理套件"; diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.h b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.h deleted file mode 100644 index 5321a1d..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// VTAcknowledgement.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -/** - `VTAcknowledgement` is a subclass of `NSObject` that represents a single acknowledgement. - */ -@interface VTAcknowledgement : NSObject - -/** - The acknowledgement title (for instance the pod’s name). - */ -@property (nonatomic, copy) NSString *title; - -/** - The acknowledgement body text (for instance the pod’s license). - */ -@property (nonatomic, copy) NSString *text; - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.m b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.m deleted file mode 100644 index d1d192d..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgement.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// VTAcknowledgement.m -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "VTAcknowledgement.h" - -@implementation VTAcknowledgement - -@end - diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.h b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.h deleted file mode 100644 index 75d5eed..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// VTAcknowledgementViewController.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -/** - `VTAcknowledgementViewController` is a subclass of `UIViewController` that displays - a single acknowledgement. - */ -@interface VTAcknowledgementViewController : UIViewController - -/** - Custom font for the main text view. If `nil` (default), the system font (size 17) is used. - */ -@property (nonatomic, strong) UIFont *textViewFont; - -/** - Initializes an acknowledgement view controller with a title and a body text. - - @param title The acknowledgement title. - @param text The acknowledgement body text. - - @return A newly created `VTAcknowledgementViewController` instance. - */ -- (instancetype)initWithTitle:(NSString *)title text:(NSString *)text; - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.m b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.m deleted file mode 100644 index 6a9f11d..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementViewController.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// VTAcknowledgementViewController.m -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "VTAcknowledgementViewController.h" - -@interface VTAcknowledgementViewController () - -@property (nonatomic, copy) NSString *text; - -@end - - -@implementation VTAcknowledgementViewController - -- (instancetype)initWithTitle:(NSString *)title text:(NSString *)text -{ - self = [super init]; - if (self) { - self.title = title; - self.text = text; - } - - return self; -} - -- (void)loadView -{ - UITextView *textView = [[UITextView alloc] initWithFrame:CGRectZero]; - textView.alwaysBounceVertical = YES; - textView.font = self.textViewFont ?: [UIFont systemFontOfSize:17]; - textView.text = self.text; - textView.editable = NO; - textView.dataDetectorTypes = UIDataDetectorTypeLink; - if ([textView respondsToSelector:@selector(setTextContainerInset:)]) { - textView.textContainerInset = UIEdgeInsetsMake(12, 10, 12, 10); - } - - self.view = textView; -} - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.h b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.h deleted file mode 100644 index b4b1031..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// VTAcknowledgementsViewController.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -// Only available with Xcode 6+, so we need to handle older versions too. -#ifndef IBInspectable -#define IBInspectable -#endif - - -/** - `VTAcknowledgementsViewController` is a subclass of `UITableViewController` that displays - a list of acknowledgements. - */ -@interface VTAcknowledgementsViewController : UITableViewController - -/** - Custom font for the license main text view. If `nil` (default), the system font (size 17) is used. - */ -@property (nonatomic, strong) UIFont *licenseTextViewFont; - -/** - Array of `VTAcknowledgement`. - */ -@property (nonatomic, strong) NSArray *acknowledgements; - -/** - Header text to be displayed above the list of the acknowledgements. - It needs to get set before `viewDidLoad` gets called. - Its value can be defined in the header of the plist file. - */ -@property (nonatomic, copy) IBInspectable NSString *headerText; - -/** - Footer text to be displayed below the list of the acknowledgements. - It needs to get set before `viewDidLoad` gets called. - Its value can be defined in the header of the plist file. - */ -@property (nonatomic, copy) IBInspectable NSString *footerText; - -/** - Acknowledgements plist file name whose contents to be loaded. - It expects to get set by "User Defined Runtime Attributes" in Interface Builder. - */ -@property (nonatomic, copy) IBInspectable NSString *acknowledgementsPlistName; - - -/** - Creates a new acknowledgements view controller - - @return A newly created `VTAcknowledgementsViewController` instance. - */ -+ (instancetype)acknowledgementsViewController; - -/** - The localized version of “Acknowledgements”. - You can use this value for the button presenting the `VTAcknowledgementsViewController`, for instance. - - @return The localized title. - */ -+ (NSString *)localizedTitle; - -/** - Initializes an acknowledgements view controller with the content of the `Pods-acknowledgements.plist`. - - @param acknowledgementsPlistPath The path to the `Pods-acknowledgements.plist`. - - @return A newly created `VTAcknowledgementsViewController` instance. - */ -- (instancetype)initWithAcknowledgementsPlistPath:(NSString *)acknowledgementsPlistPath; - -@end - -#import "VTAcknowledgement.h" -#import "VTAcknowledgementViewController.h" diff --git a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.m b/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.m deleted file mode 100644 index c9a5bbf..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/VTAcknowledgementsViewController.m +++ /dev/null @@ -1,357 +0,0 @@ -// -// VTAcknowledgementsViewController.m -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "VTAcknowledgementsViewController.h" -#import "VTAcknowledgementViewController.h" -#import "VTAcknowledgement.h" - -static NSString *const VTDefaultAcknowledgementsPlistName = @"Pods-acknowledgements"; -static NSString *const VTDefaultHeaderText = @"This application makes use of the following third party libraries:"; -static NSString *const VTDefaultFooterText = @"Generated by CocoaPods - http://cocoapods.org"; -static NSString *const VTCocoaPodsURLString = @"http://cocoapods.org"; -static NSString *const VTCellIdentifier = @"Cell"; - -static const CGFloat VTLabelMargin = 20; - - -@interface VTAcknowledgementsViewController () - -+ (NSString *)acknowledgementsPlistPathForName:(NSString *)name; -+ (NSString *)defaultAcknowledgementsPlistPath; -+ (NSString *)localizedStringForKey:(NSString *)key withDefault:(NSString *)defaultString; -+ (NSString *)localizedCocoaPodsFooterText; - -- (void)configureHeaderView; -- (void)configureFooterView; -- (CGFloat)heightForLabelWithText:(NSString *)labelText andWidth:(CGFloat)labelWidth; - -- (IBAction)dismissViewController:(id)sender; -- (void)commonInitWithAcknowledgementsPlistPath:(NSString *)acknowledgementsPlistPath; -- (void)openCocoaPodsWebsite:(id)sender; - -@end - - -@implementation VTAcknowledgementsViewController - -+ (NSString *)acknowledgementsPlistPathForName:(NSString *)name -{ - return [[NSBundle mainBundle] pathForResource:name ofType:@"plist"]; -} - -+ (NSString *)defaultAcknowledgementsPlistPath -{ - return [self acknowledgementsPlistPathForName:VTDefaultAcknowledgementsPlistName]; -} - -+ (instancetype)acknowledgementsViewController -{ - NSString *path = self.defaultAcknowledgementsPlistPath; - return [[self.class alloc] initWithAcknowledgementsPlistPath:path]; -} - -- (instancetype)initWithAcknowledgementsPlistPath:(NSString *)acknowledgementsPlistPath -{ - self = [super initWithStyle:UITableViewStyleGrouped]; - if (self) { - [self commonInitWithAcknowledgementsPlistPath:acknowledgementsPlistPath]; - } - - return self; -} - -- (void)awakeFromNib -{ - [super awakeFromNib]; - - NSString *path; - if (self.acknowledgementsPlistName) { - path = [self.class acknowledgementsPlistPathForName:self.acknowledgementsPlistName]; - } - else { - path = self.class.defaultAcknowledgementsPlistPath; - } - - [self commonInitWithAcknowledgementsPlistPath:path]; -} - -- (void)commonInitWithAcknowledgementsPlistPath:(NSString *)acknowledgementsPlistPath -{ - self.title = self.class.localizedTitle; - NSDictionary *root = [NSDictionary dictionaryWithContentsOfFile:acknowledgementsPlistPath]; - NSArray *preferenceSpecifiers = root[@"PreferenceSpecifiers"]; - if (preferenceSpecifiers.count >= 2) { - NSString *headerText = preferenceSpecifiers.firstObject[@"FooterText"]; - NSString *footerText = preferenceSpecifiers.lastObject[@"FooterText"]; - - if ([headerText isEqualToString:VTDefaultHeaderText]) { - self.headerText = nil; - } - else if (![headerText isEqualToString:@""]) { - self.headerText = headerText; - } - - if ([footerText isEqualToString:VTDefaultFooterText]) { - self.footerText = [VTAcknowledgementsViewController localizedCocoaPodsFooterText]; - } - else if (![footerText isEqualToString:@""]) { - self.footerText = footerText; - } - - // Remove the header and footer - NSRange range = NSMakeRange(1, preferenceSpecifiers.count - 2); - preferenceSpecifiers = [preferenceSpecifiers subarrayWithRange:range]; - } - - NSMutableArray *acknowledgements = [NSMutableArray array]; - for (NSDictionary *preferenceSpecifier in preferenceSpecifiers) { - VTAcknowledgement *acknowledgement = [VTAcknowledgement new]; - acknowledgement.title = preferenceSpecifier[@"Title"]; - acknowledgement.text = preferenceSpecifier[@"FooterText"]; - [acknowledgements addObject:acknowledgement]; - } - - [acknowledgements sortUsingComparator:^NSComparisonResult(VTAcknowledgement *obj1, VTAcknowledgement *obj2) { - return [obj1.title compare:obj2.title - options:kNilOptions - range:NSMakeRange(0, obj1.title.length) - locale:[NSLocale currentLocale]]; - }]; - - self.acknowledgements = acknowledgements; -} - - -#pragma mark - Localization - -+ (NSString *)localizedStringForKey:(NSString *)key withDefault:(NSString *)defaultString -{ - static NSBundle *bundle = nil; - if (!bundle) { - NSString *bundlePath = [NSBundle.mainBundle pathForResource:@"VTAcknowledgementsViewController" ofType:@"bundle"]; - bundle = [NSBundle bundleWithPath:bundlePath]; - - NSString *language = NSLocale.preferredLanguages.count? NSLocale.preferredLanguages.firstObject: @"en"; - if (![bundle.localizations containsObject:language]) { - language = [language componentsSeparatedByString:@"-"].firstObject; - } - if ([bundle.localizations containsObject:language]) { - bundlePath = [bundle pathForResource:language ofType:@"lproj"]; - } - - bundle = [NSBundle bundleWithPath:bundlePath] ?: NSBundle.mainBundle; - } - - defaultString = [bundle localizedStringForKey:key value:defaultString table:nil]; - return [NSBundle.mainBundle localizedStringForKey:key value:defaultString table:nil]; -} - -+ (NSString *)localizedTitle -{ - return [self localizedStringForKey:@"VTAckAcknowledgements" withDefault:@"Acknowledgements"]; -} - -+ (NSString *)localizedCocoaPodsFooterText -{ - return [NSString stringWithFormat:@"%@\n%@", - [self.class localizedStringForKey:@"VTAckGeneratedByCocoaPods" withDefault:@"Generated by CocoaPods"], - VTCocoaPodsURLString]; -} - - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - if (self.headerText) { - [self configureHeaderView]; - } - - if (self.footerText) { - [self configureFooterView]; - } - - if (self.presentingViewController && self == [self.navigationController.viewControllers firstObject]) { - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:self - action:@selector(dismissViewController:)]; - } -} - -- (void)configureHeaderView -{ - UIFont *font = [UIFont systemFontOfSize:12]; - CGFloat labelWidth = CGRectGetWidth(self.view.frame) - 2 * VTLabelMargin; - CGFloat labelHeight = [self heightForLabelWithText:self.headerText andWidth:labelWidth]; - - CGRect labelFrame = CGRectMake(VTLabelMargin, VTLabelMargin, labelWidth, labelHeight); - - UILabel *label = [[UILabel alloc] initWithFrame:labelFrame]; - label.text = self.headerText; - label.font = font; - label.textColor = [UIColor grayColor]; - label.backgroundColor = [UIColor clearColor]; - label.numberOfLines = 0; - label.textAlignment = NSTextAlignmentCenter; - label.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin); - - CGRect headerFrame = CGRectMake(0, 0, CGRectGetWidth(self.view.frame), CGRectGetHeight(label.frame) + 2 * VTLabelMargin); - UIView *headerView = [[UIView alloc] initWithFrame:headerFrame]; - [headerView addSubview:label]; - self.tableView.tableHeaderView = headerView; -} - -- (void)configureFooterView -{ - UIFont *font = [UIFont systemFontOfSize:12]; - CGFloat labelWidth = CGRectGetWidth(self.view.frame) - 2 * VTLabelMargin; - CGFloat labelHeight = [self heightForLabelWithText:self.footerText andWidth:labelWidth]; - - CGRect labelFrame = CGRectMake(VTLabelMargin, 0, labelWidth, labelHeight); - - UILabel *label = [[UILabel alloc] initWithFrame:labelFrame]; - label.text = self.footerText; - label.font = font; - label.textColor = [UIColor grayColor]; - label.backgroundColor = [UIColor clearColor]; - label.numberOfLines = 0; - label.textAlignment = NSTextAlignmentCenter; - label.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin); - label.userInteractionEnabled = YES; - - if ([self.footerText rangeOfString:[NSURL URLWithString:VTCocoaPodsURLString].host].location != NSNotFound) { - UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openCocoaPodsWebsite:)]; - [label addGestureRecognizer:tapGestureRecognizer]; - } - - CGRect footerFrame = CGRectMake(0, 0, CGRectGetWidth(label.frame), CGRectGetHeight(label.frame)); - UIView *footerView = [[UIView alloc] initWithFrame:footerFrame]; - footerView.userInteractionEnabled = YES; - [footerView addSubview:label]; - label.frame = CGRectMake(0, 0, CGRectGetWidth(label.frame), CGRectGetHeight(label.frame)); - self.tableView.tableFooterView = footerView; -} - -- (CGFloat)heightForLabelWithText:(NSString *)labelText andWidth:(CGFloat)labelWidth -{ - UIFont *font = [UIFont systemFontOfSize:12]; - CGFloat labelHeight; - - NSStringDrawingOptions options = (NSLineBreakByWordWrapping | NSStringDrawingUsesLineFragmentOrigin); - CGRect labelBounds = [labelText boundingRectWithSize:CGSizeMake(labelWidth, CGFLOAT_MAX) - options:options - attributes:@{NSFontAttributeName: font} - context:nil]; - labelHeight = CGRectGetHeight(labelBounds); - - return ceilf(labelHeight); -} - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - - [self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow - animated:animated]; -} - -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - if (self.acknowledgements.count == 0) { - NSLog(@"** VTAcknowledgementsViewController Warning **"); - NSLog(@"No acknowledgements found."); - NSLog(@"This probably means that you didn’t import the `Pods-acknowledgements.plist` to your main target."); - NSLog(@"Please take a look at https://github.com/vtourraine/VTAcknowledgementsViewController for instructions."); - } -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation -{ - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - - if (self.headerText) { - [self configureHeaderView]; - } - - if (self.footerText) { - [self configureFooterView]; - } -} - - -#pragma mark - Actions - -- (void)openCocoaPodsWebsite:(id)sender -{ - NSURL *URL = [NSURL URLWithString:VTCocoaPodsURLString]; - [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:nil]; -} - -- (IBAction)dismissViewController:(id)sender -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - - -#pragma mark - Table view data source - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return self.acknowledgements.count; -} - -- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return UITableViewAutomaticDimension; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:VTCellIdentifier]; - if (!cell) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:VTCellIdentifier]; - } - - VTAcknowledgement *acknowledgement = self.acknowledgements[indexPath.row]; - cell.textLabel.text = acknowledgement.title; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - - return cell; -} - - -#pragma mark - Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - VTAcknowledgement *acknowledgement = self.acknowledgements[indexPath.row]; - VTAcknowledgementViewController *viewController = [[VTAcknowledgementViewController alloc] initWithTitle:acknowledgement.title text:acknowledgement.text]; - viewController.textViewFont = self.licenseTextViewFont; - [self.navigationController pushViewController:viewController animated:YES]; -} - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgement.h b/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgement.h deleted file mode 100644 index 5321a1d..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgement.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// VTAcknowledgement.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -/** - `VTAcknowledgement` is a subclass of `NSObject` that represents a single acknowledgement. - */ -@interface VTAcknowledgement : NSObject - -/** - The acknowledgement title (for instance the pod’s name). - */ -@property (nonatomic, copy) NSString *title; - -/** - The acknowledgement body text (for instance the pod’s license). - */ -@property (nonatomic, copy) NSString *text; - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementViewController.h b/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementViewController.h deleted file mode 100644 index 75d5eed..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementViewController.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// VTAcknowledgementViewController.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -/** - `VTAcknowledgementViewController` is a subclass of `UIViewController` that displays - a single acknowledgement. - */ -@interface VTAcknowledgementViewController : UIViewController - -/** - Custom font for the main text view. If `nil` (default), the system font (size 17) is used. - */ -@property (nonatomic, strong) UIFont *textViewFont; - -/** - Initializes an acknowledgement view controller with a title and a body text. - - @param title The acknowledgement title. - @param text The acknowledgement body text. - - @return A newly created `VTAcknowledgementViewController` instance. - */ -- (instancetype)initWithTitle:(NSString *)title text:(NSString *)text; - -@end diff --git a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementsViewController.h b/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementsViewController.h deleted file mode 100644 index b4b1031..0000000 --- a/Vendored/VTAcknowledgementsViewController/Sources/include/VTAcknowledgementsViewController.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// VTAcknowledgementsViewController.h -// -// Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -// Only available with Xcode 6+, so we need to handle older versions too. -#ifndef IBInspectable -#define IBInspectable -#endif - - -/** - `VTAcknowledgementsViewController` is a subclass of `UITableViewController` that displays - a list of acknowledgements. - */ -@interface VTAcknowledgementsViewController : UITableViewController - -/** - Custom font for the license main text view. If `nil` (default), the system font (size 17) is used. - */ -@property (nonatomic, strong) UIFont *licenseTextViewFont; - -/** - Array of `VTAcknowledgement`. - */ -@property (nonatomic, strong) NSArray *acknowledgements; - -/** - Header text to be displayed above the list of the acknowledgements. - It needs to get set before `viewDidLoad` gets called. - Its value can be defined in the header of the plist file. - */ -@property (nonatomic, copy) IBInspectable NSString *headerText; - -/** - Footer text to be displayed below the list of the acknowledgements. - It needs to get set before `viewDidLoad` gets called. - Its value can be defined in the header of the plist file. - */ -@property (nonatomic, copy) IBInspectable NSString *footerText; - -/** - Acknowledgements plist file name whose contents to be loaded. - It expects to get set by "User Defined Runtime Attributes" in Interface Builder. - */ -@property (nonatomic, copy) IBInspectable NSString *acknowledgementsPlistName; - - -/** - Creates a new acknowledgements view controller - - @return A newly created `VTAcknowledgementsViewController` instance. - */ -+ (instancetype)acknowledgementsViewController; - -/** - The localized version of “Acknowledgements”. - You can use this value for the button presenting the `VTAcknowledgementsViewController`, for instance. - - @return The localized title. - */ -+ (NSString *)localizedTitle; - -/** - Initializes an acknowledgements view controller with the content of the `Pods-acknowledgements.plist`. - - @param acknowledgementsPlistPath The path to the `Pods-acknowledgements.plist`. - - @return A newly created `VTAcknowledgementsViewController` instance. - */ -- (instancetype)initWithAcknowledgementsPlistPath:(NSString *)acknowledgementsPlistPath; - -@end - -#import "VTAcknowledgement.h" -#import "VTAcknowledgementViewController.h" diff --git a/src/Mudrammer/Controllers/Settings/AcknowledgementsView.swift b/src/Mudrammer/Controllers/Settings/AcknowledgementsView.swift new file mode 100644 index 0000000..e994c09 --- /dev/null +++ b/src/Mudrammer/Controllers/Settings/AcknowledgementsView.swift @@ -0,0 +1,358 @@ +import SwiftUI +import UIKit + +struct Acknowledgement: Identifiable { + let id: String + let title: String + let licenseText: String + + static let all: [Acknowledgement] = [ + Acknowledgement( + id: "CocoaAsyncSocket", + title: "CocoaAsyncSocket", + licenseText: """ + This class is in the public domain. + Originally created by Robbie Hanson in Q3 2010. + Updated and maintained by Deusty LLC and the Apple development community. + + https://github.com/robbiehanson/CocoaAsyncSocket + """ + ), + Acknowledgement( + id: "DAKeyboardControl", + title: "DAKeyboardControl", + licenseText: """ + Copyright (c) 2012 Daniel Amitay (http://danielamitay.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "FXForms", + title: "FXForms", + licenseText: """ + FXForms + + Copyright (C) 2014 Charcoal Design + + This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + """ + ), + Acknowledgement( + id: "JSQSystemSoundPlayer", + title: "JSQSystemSoundPlayer", + licenseText: """ + Copyright (c) 2015 Jesse Squires + + http://www.hexedbits.com + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "JTSImageViewController", + title: "JTSImageViewController", + licenseText: """ + The MIT License (MIT) + + Copyright (c) 2014 Jared Sinclair + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "KVOController", + title: "KVOController", + licenseText: """ + BSD License + + For KVOController software + + Copyright (c) 2014, Facebook, Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + ), + Acknowledgement( + id: "libextobjc", + title: "libextobjc", + licenseText: """ + Copyright (c) 2012 - 2014 Justin Spahr-Summers + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "Masonry", + title: "Masonry", + licenseText: """ + Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "MyLilTimer", + title: "MyLilTimer", + licenseText: """ + The MIT License (MIT) + + Copyright (c) 2014 Jonathon Mah + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "OSCache", + title: "OSCache", + licenseText: """ + OSCache + + Copyright (C) 2014 Charcoal Design + + This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + """ + ), + Acknowledgement( + id: "QuickDialog", + title: "QuickDialog", + licenseText: """ + Copyright 2011 ESCOZ Inc - http://escoz.com + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + """ + ), + Acknowledgement( + id: "SAMRateLimit", + title: "SAMRateLimit", + licenseText: """ + Copyright (c) 2012-2013 Sam Soffes, http://soff.es + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "SSAccessibility", + title: "SSAccessibility", + licenseText: """ + Copyright (c) 2013,2014 Jonathan Hersh + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "SPLCore", + title: "SPLCore", + licenseText: """ + Copyright (c) 2013 Jonathan Hersh + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "SPLUserActivity", + title: "SPLUserActivity", + licenseText: """ + Copyright (c) 2015 Jonathan Hersh + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "SSDataSources", + title: "SSDataSources", + licenseText: """ + Copyright (c) 2013-2014 Jonathan Hersh + A Splinesoft production. + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "SSOperations", + title: "SSOperations", + licenseText: """ + Copyright (c) 2013 Jonathan Hersh + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + Acknowledgement( + id: "TTTAttributedLabel", + title: "TTTAttributedLabel", + licenseText: """ + Copyright (c) 2011 Mattt Thompson (http://mattt.me/) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + ), + ] +} + +struct AcknowledgementsListView: View { + let backgroundColor: Color + let textColor: Color + var onSelect: (Acknowledgement) -> Void + + var body: some View { + List { + Section { + Text("Wammer is a fork of MUDRammer by Jonathan Hersh (splinesoft).") + .font(.footnote) + .foregroundStyle(textColor.opacity(0.7)) + .listRowBackground(backgroundColor) + } + Section(header: Text(NSLocalizedString("ACK_HEADER", comment: ""))) { + ForEach(Acknowledgement.all) { ack in + Button { + onSelect(ack) + } label: { + HStack { + Text(ack.title) + .foregroundStyle(textColor) + Spacer() + Image(systemName: "chevron.right") + .font(.footnote.weight(.semibold)) + .foregroundStyle(textColor.opacity(0.5)) + } + } + .listRowBackground(backgroundColor) + } + } + } + .listStyle(.insetGrouped) + .scrollContentBackground(.hidden) + .background(backgroundColor) + } +} + +struct AcknowledgementDetailView: View { + let backgroundColor: Color + let textColor: Color + let licenseText: String + + var body: some View { + ScrollView { + Text(licenseText) + .font(.footnote) + .foregroundStyle(textColor) + .textSelection(.enabled) + .frame(maxWidth: .infinity, alignment: .leading) + .padding() + } + .background(backgroundColor) + } +} + +@objc(AcknowledgementsViewController) +final class AcknowledgementsViewController: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + title = NSLocalizedString("ACKNOWLEDGEMENTS", comment: "") + + guard let themer = SSThemes.sharedThemer(), + let uiBg = themer.value(forThemeKey: kThemeBackgroundColor) as? UIColor, + let uiText = themer.value(forThemeKey: kThemeFontColor) as? UIColor + else { return } + let bgColor = Color(uiColor: uiBg) + let textColor = Color(uiColor: uiText) + + let hosting = UIHostingController(rootView: AcknowledgementsListView( + backgroundColor: bgColor, + textColor: textColor + ) { [weak self] ack in + guard let self else { return } + let detail = UIHostingController(rootView: AcknowledgementDetailView( + backgroundColor: bgColor, + textColor: textColor, + licenseText: ack.licenseText + )) + detail.title = ack.title + detail.view.backgroundColor = uiBg + self.navigationController?.pushViewController(detail, animated: true) + }) + hosting.view.backgroundColor = uiBg + view.backgroundColor = uiBg + addChild(hosting) + hosting.view.frame = view.bounds + hosting.view.autoresizingMask = [.flexibleWidth, .flexibleHeight] as UIView.AutoresizingMask + view.addSubview(hosting.view) + hosting.didMove(toParent: self) + } +} diff --git a/src/Mudrammer/Controllers/Settings/SSAdvSettingsController.m b/src/Mudrammer/Controllers/Settings/SSAdvSettingsController.m index b9ccd72..e717445 100644 --- a/src/Mudrammer/Controllers/Settings/SSAdvSettingsController.m +++ b/src/Mudrammer/Controllers/Settings/SSAdvSettingsController.m @@ -12,7 +12,7 @@ #import "SSStringCoder.h" #import "SSValueCell.h" #import "SSStringEncodingPicker.h" -@import VTAcknowledgementsViewController; +#import "Wammer-Swift.h" #import "SSTextEntryCell.h" @import Masonry; @@ -103,7 +103,7 @@ - (void)viewDidLoad { NSIndexPath *indexPath) { @strongify(self); if (indexPath.section == SSAdvancedSectionAcknowledgements) { - cell.textLabel.text = [VTAcknowledgementsViewController localizedTitle]; + cell.textLabel.text = NSLocalizedString(@"ACKNOWLEDGEMENTS", nil); cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.selectionStyle = UITableViewCellSelectionStyleGray; [SSThemes configureCell:cell]; @@ -319,13 +319,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if (indexPath.section == (NSInteger)[self.dataSource indexOfSectionWithIdentifier:@(SSAdvancedSectionAcknowledgements)]) { - VTAcknowledgementsViewController *ack = [[VTAcknowledgementsViewController alloc] initWithAcknowledgementsPlistPath: - [[NSBundle mainBundle] pathForResource:@"Pods-acknowledgements" - ofType:@"plist"]]; - - ack.headerText = NSLocalizedString(@"ACK_HEADER", nil); - - ack.navigationItem.leftBarButtonItem = nil; + AcknowledgementsViewController *ack = [[AcknowledgementsViewController alloc] init]; [self.navigationController pushViewController:ack animated:YES]; diff --git a/src/Mudrammer/Supporting Files/Pods-acknowledgements.plist b/src/Mudrammer/Supporting Files/Pods-acknowledgements.plist deleted file mode 100644 index 5eff44a..0000000 --- a/src/Mudrammer/Supporting Files/Pods-acknowledgements.plist +++ /dev/null @@ -1,316 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - This class is in the public domain. -Originally created by Robbie Hanson in Q3 2010. -Updated and maintained by Deusty LLC and the Apple development community. - -https://github.com/robbiehanson/CocoaAsyncSocket - Title - CocoaAsyncSocket - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2012 Daniel Amitay (http://danielamitay.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - DAKeyboardControl - Type - PSGroupSpecifier - - - FooterText - FXForms - -Copyright (C) 2014 Charcoal Design - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - Title - FXForms - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 Jesse Squires - -http://www.hexedbits.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - JSQSystemSoundPlayer - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Jared Sinclair - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - JTSImageViewController - Type - PSGroupSpecifier - - - FooterText - BSD License - -For KVOController software - -Copyright (c) 2014, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Title - KVOController - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2012 - 2014 Justin Spahr-Summers - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - libextobjc - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - Masonry - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Jonathon Mah - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - MyLilTimer - Type - PSGroupSpecifier - - - FooterText - OSCache - -Copyright (C) 2014 Charcoal Design - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - Title - OSCache - Type - PSGroupSpecifier - - - FooterText - Copyright 2011 ESCOZ Inc - http://escoz.com - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - Title - QuickDialog - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2012-2013 Sam Soffes, http://soff.es - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SAMRateLimit - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013,2014 Jonathan Hersh - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SSAccessibility - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013 Jonathan Hersh - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SPLCore - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 Jonathan Hersh - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SPLUserActivity - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013-2014 Jonathan Hersh -A Splinesoft production. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SSDataSources - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013 Jonathan Hersh - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - SSOperations - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2011 Mattt Thompson (http://mattt.me/) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - TTTAttributedLabel - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2013-2015 Vincent Tourraine (http://www.vtourraine.net) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - Title - VTAcknowledgementsViewController - Type - PSGroupSpecifier - - - FooterText - - Title - Acknowledgements - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/src/Mudrammer/Supporting Files/en.lproj/Localizable.strings b/src/Mudrammer/Supporting Files/en.lproj/Localizable.strings index 61ccd42..81cc1b8 100644 --- a/src/Mudrammer/Supporting Files/en.lproj/Localizable.strings +++ b/src/Mudrammer/Supporting Files/en.lproj/Localizable.strings @@ -5,6 +5,7 @@ "AUDIO" = "Audio"; "AUDIO_SECTION_FOOTER" = "Set background music to play while connected to this world."; +"ACKNOWLEDGEMENTS" = "Acknowledgements"; "ACK_HEADER" = "Wammer is grateful for the following libraries and projects:"; /* Separate multiple actions with a semicolon (;). */ diff --git a/src/Mudrammer/Supporting Files/fr.lproj/Localizable.strings b/src/Mudrammer/Supporting Files/fr.lproj/Localizable.strings index 4391c20..578193c 100644 --- a/src/Mudrammer/Supporting Files/fr.lproj/Localizable.strings +++ b/src/Mudrammer/Supporting Files/fr.lproj/Localizable.strings @@ -3,6 +3,7 @@ "ADD_CONNECTION" = "Ajouter une connection"; "ADVANCED" = "Avancé"; +"ACKNOWLEDGEMENTS" = "Remerciements"; "ACK_HEADER" = "Wammer is grateful for the following libraries and projects:"; /* Separate multiple actions with a semicolon (;). */ diff --git a/src/Mudrammer/Supporting Files/it.lproj/Localizable.strings b/src/Mudrammer/Supporting Files/it.lproj/Localizable.strings index b5dd101..586ffb9 100644 --- a/src/Mudrammer/Supporting Files/it.lproj/Localizable.strings +++ b/src/Mudrammer/Supporting Files/it.lproj/Localizable.strings @@ -3,6 +3,7 @@ "ADD_CONNECTION" = "Aggiungi nuova connessione"; "ADVANCED" = "Avanzate"; +"ACKNOWLEDGEMENTS" = "Ringraziamenti"; "ACK_HEADER" = "Wammer is grateful for the following libraries and projects:"; /* Separate multiple actions with a semicolon (;). */ From fb0db60aac7f3bb97f038d6832538317cb9bb5a3 Mon Sep 17 00:00:00 2001 From: James Power Date: Sat, 14 Mar 2026 14:07:41 -0400 Subject: [PATCH 3/3] Use Bundle.appVersion for GMCP hello and about screen version strings. --- src/Mudrammer/Additions/Bundle+AppVersion.swift | 9 +++++++++ src/Mudrammer/Additions/UIApplication+Additions.m | 6 +++--- src/Mudrammer/Network/SSMUDSocket.swift | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 src/Mudrammer/Additions/Bundle+AppVersion.swift diff --git a/src/Mudrammer/Additions/Bundle+AppVersion.swift b/src/Mudrammer/Additions/Bundle+AppVersion.swift new file mode 100644 index 0000000..3a55e64 --- /dev/null +++ b/src/Mudrammer/Additions/Bundle+AppVersion.swift @@ -0,0 +1,9 @@ +import Foundation + +extension Bundle { + @objc var appVersion: String { + let short = infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.0" + let build = infoDictionary?["CFBundleVersion"] as? String ?? "0" + return "\(short).\(build)" + } +} diff --git a/src/Mudrammer/Additions/UIApplication+Additions.m b/src/Mudrammer/Additions/UIApplication+Additions.m index f4450c6..2414def 100644 --- a/src/Mudrammer/Additions/UIApplication+Additions.m +++ b/src/Mudrammer/Additions/UIApplication+Additions.m @@ -7,7 +7,7 @@ // #import "UIApplication+Additions.h" -#import +#import "Wammer-Swift.h" @implementation UIApplication (Additions) @@ -32,8 +32,8 @@ + (NSString *)applicationFullAbout { ]; }); - return [NSString stringWithFormat:@"%@\n\n%@", - [UIApplication applicationNameVersionBuild], + return [NSString stringWithFormat:@"Wammer %@\n\n%@", + [NSBundle mainBundle].appVersion, extras[arc4random_uniform((uint32_t)[extras count])]]; } diff --git a/src/Mudrammer/Network/SSMUDSocket.swift b/src/Mudrammer/Network/SSMUDSocket.swift index 653da01..51a30f2 100644 --- a/src/Mudrammer/Network/SSMUDSocket.swift +++ b/src/Mudrammer/Network/SSMUDSocket.swift @@ -213,7 +213,7 @@ extension SSMUDSocket: TelnetClientDelegate { func onGMCPNegotiated() { telnetSession?.sendGMCP( module: "Core.Hello", - json: "{\"client\":\"Wammer\",\"version\":\"1.0.1\"}" + json: #"{"client":"Wammer","version":"\#(Bundle.main.appVersion)"}"# ) }