From 9a1748793cb1c37586c20fd89a26e8615246b76b Mon Sep 17 00:00:00 2001 From: Nolan Waite Date: Wed, 19 Jun 2024 01:27:04 -0300 Subject: [PATCH] Add privacy manifests or use other APIs (#1186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Add privacy manifest to both Awful and Smilie Keyboard. • Bump Lottie to get its privacy manifest. • Stop using ProcessInfo.systemUptime for gesture timing. --- App/Main/PrivacyInfo.xcprivacy | 18 ++++++++++++++++++ App/View Controllers/ImageViewController.swift | 6 +++--- Awful.xcodeproj/project.pbxproj | 8 ++++++++ .../xcshareddata/swiftpm/Package.resolved | 4 ++-- Smilies Extra/Keyboard/PrivacyInfo.xcprivacy | 17 +++++++++++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 App/Main/PrivacyInfo.xcprivacy create mode 100644 Smilies Extra/Keyboard/PrivacyInfo.xcprivacy diff --git a/App/Main/PrivacyInfo.xcprivacy b/App/Main/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..cc0b9415b --- /dev/null +++ b/App/Main/PrivacyInfo.xcprivacy @@ -0,0 +1,18 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + 1C8F.1 + CA92.1 + + + + + diff --git a/App/View Controllers/ImageViewController.swift b/App/View Controllers/ImageViewController.swift index 464a862eb..d2dc5f966 100644 --- a/App/View Controllers/ImageViewController.swift +++ b/App/View Controllers/ImageViewController.swift @@ -343,8 +343,8 @@ final class ImageViewController: UIViewController { @IBAction @objc fileprivate func didPanToDismiss(_ sender: UIPanGestureRecognizer) { switch sender.state { case .began: - panStart = ProcessInfo.processInfo.systemUptime - + panStart = CACurrentMediaTime() + case .changed: let velocity = sender.velocity(in: self) if velocity.y < 0 || abs(velocity.x) > abs(velocity.y) { @@ -356,7 +356,7 @@ final class ImageViewController: UIViewController { let translation = sender.translation(in: self) if abs(translation.x) < 30 { if translation.y > 60 { - if ProcessInfo.processInfo.systemUptime - panStart < 0.5 { + if CACurrentMediaTime() - panStart < 0.5 { panToDismissAction?() } } diff --git a/Awful.xcodeproj/project.pbxproj b/Awful.xcodeproj/project.pbxproj index 3acae7e98..3b52eb521 100644 --- a/Awful.xcodeproj/project.pbxproj +++ b/Awful.xcodeproj/project.pbxproj @@ -186,6 +186,8 @@ 1CF186A617D48E5700B26717 /* Thread Tags in Resources */ = {isa = PBXBuildFile; fileRef = 1CF186A517D48E5700B26717 /* Thread Tags */; }; 1CF264CA1F7811EA0059CCCA /* RootTabBarController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1CF264C91F7811EA0059CCCA /* RootTabBarController.storyboard */; }; 1CF280982055EB9B00913149 /* AwfulRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF280972055EB9B00913149 /* AwfulRoute.swift */; }; + 1CF521752C228E76009712A7 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1CF521742C228E76009712A7 /* PrivacyInfo.xcprivacy */; }; + 1CF521772C228F88009712A7 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1CF521762C228F88009712A7 /* PrivacyInfo.xcprivacy */; }; 1CF6786B201E751D009A9640 /* MessageListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF6786A201E751D009A9640 /* MessageListDataSource.swift */; }; 1CF6786E201E8F45009A9640 /* MessageListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF6786D201E8F45009A9640 /* MessageListCell.swift */; }; 1CFC996A1BD3F402001180A7 /* PostsPageRefreshArrowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CFC99691BD3F402001180A7 /* PostsPageRefreshArrowView.swift */; }; @@ -484,6 +486,8 @@ 1CF186A517D48E5700B26717 /* Thread Tags */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Thread Tags"; sourceTree = ""; }; 1CF264C91F7811EA0059CCCA /* RootTabBarController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = RootTabBarController.storyboard; sourceTree = ""; }; 1CF280972055EB9B00913149 /* AwfulRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwfulRoute.swift; sourceTree = ""; }; + 1CF521742C228E76009712A7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 1CF521762C228F88009712A7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 1CF6786A201E751D009A9640 /* MessageListDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageListDataSource.swift; sourceTree = ""; }; 1CF6786D201E8F45009A9640 /* MessageListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageListCell.swift; sourceTree = ""; }; 1CFC99691BD3F402001180A7 /* PostsPageRefreshArrowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostsPageRefreshArrowView.swift; sourceTree = ""; }; @@ -591,6 +595,7 @@ 1C6BDD21265CB307005475CE /* Imports.swift */, 1CDD0A4619B7D89B009811C4 /* LaunchScreen.storyboard */, 1C9AEBCD210C3BAF00C9A567 /* main.swift */, + 1CF521762C228F88009712A7 /* PrivacyInfo.xcprivacy */, 1C8D114619ACDAD9005D46CB /* RootViewControllerStack.swift */, ); path = Main; @@ -887,6 +892,7 @@ 1C66AA1619DDF8DD001B9A41 /* NeedsFullAccessView.h */, 1C66AA1719DDF8DD001B9A41 /* NeedsFullAccessView.m */, 1C66AA0D19DD3E91001B9A41 /* NeedsFullAccessView.xib */, + 1CF521742C228E76009712A7 /* PrivacyInfo.xcprivacy */, ); path = Keyboard; sourceTree = ""; @@ -1351,6 +1357,7 @@ buildActionMask = 2147483647; files = ( 1C66AA0F19DD4577001B9A41 /* NeedsFullAccessView.xib in Resources */, + 1CF521752C228E76009712A7 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1401,6 +1408,7 @@ 8C299D7316877AE9001B9D96 /* winpos95-heading-right.png in Resources */, 8C299D7416877AE9001B9D96 /* winpos95-heading.png in Resources */, 8CEB405916877D2A00BFA9A8 /* winpos95-heading-seen.png in Resources */, + 1CF521772C228F88009712A7 /* PrivacyInfo.xcprivacy in Resources */, 8CEB405C16877E1600BFA9A8 /* winpos95-heading-left-seen.png in Resources */, 2D921269292F588100B16011 /* platinum-member.png in Resources */, 8CEB405E1687865300BFA9A8 /* hourglass.gif in Resources */, diff --git a/Awful.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Awful.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5307b05a3..bd3df5db8 100644 --- a/Awful.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Awful.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/airbnb/lottie-ios.git", "state": { "branch": null, - "revision": "45517c3cfec9469bbdd4f86e32393c28ae9df0bc", - "version": "4.3.3" + "revision": "769b88d83a42ca8d5572b020c96f47e3690b3796", + "version": "4.4.3" } }, { diff --git a/Smilies Extra/Keyboard/PrivacyInfo.xcprivacy b/Smilies Extra/Keyboard/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..dd6881b47 --- /dev/null +++ b/Smilies Extra/Keyboard/PrivacyInfo.xcprivacy @@ -0,0 +1,17 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + 1C8F.1 + + + + +