Skip to content

Commit

Permalink
Add privacy manifests or use other APIs (#1186)
Browse files Browse the repository at this point in the history
• Add privacy manifest to both Awful and Smilie Keyboard.
• Bump Lottie to get its privacy manifest.
• Stop using ProcessInfo.systemUptime for gesture timing.
  • Loading branch information
nolanw authored Jun 19, 2024
1 parent c4dcc16 commit 9a17487
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 5 deletions.
18 changes: 18 additions & 0 deletions App/Main/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>1C8F.1</string>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
6 changes: 3 additions & 3 deletions App/View Controllers/ImageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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?()
}
}
Expand Down
8 changes: 8 additions & 0 deletions Awful.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -484,6 +486,8 @@
1CF186A517D48E5700B26717 /* Thread Tags */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Thread Tags"; sourceTree = "<group>"; };
1CF264C91F7811EA0059CCCA /* RootTabBarController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = RootTabBarController.storyboard; sourceTree = "<group>"; };
1CF280972055EB9B00913149 /* AwfulRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwfulRoute.swift; sourceTree = "<group>"; };
1CF521742C228E76009712A7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
1CF521762C228F88009712A7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
1CF6786A201E751D009A9640 /* MessageListDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageListDataSource.swift; sourceTree = "<group>"; };
1CF6786D201E8F45009A9640 /* MessageListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageListCell.swift; sourceTree = "<group>"; };
1CFC99691BD3F402001180A7 /* PostsPageRefreshArrowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostsPageRefreshArrowView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -591,6 +595,7 @@
1C6BDD21265CB307005475CE /* Imports.swift */,
1CDD0A4619B7D89B009811C4 /* LaunchScreen.storyboard */,
1C9AEBCD210C3BAF00C9A567 /* main.swift */,
1CF521762C228F88009712A7 /* PrivacyInfo.xcprivacy */,
1C8D114619ACDAD9005D46CB /* RootViewControllerStack.swift */,
);
path = Main;
Expand Down Expand Up @@ -887,6 +892,7 @@
1C66AA1619DDF8DD001B9A41 /* NeedsFullAccessView.h */,
1C66AA1719DDF8DD001B9A41 /* NeedsFullAccessView.m */,
1C66AA0D19DD3E91001B9A41 /* NeedsFullAccessView.xib */,
1CF521742C228E76009712A7 /* PrivacyInfo.xcprivacy */,
);
path = Keyboard;
sourceTree = "<group>";
Expand Down Expand Up @@ -1351,6 +1357,7 @@
buildActionMask = 2147483647;
files = (
1C66AA0F19DD4577001B9A41 /* NeedsFullAccessView.xib in Resources */,
1CF521752C228E76009712A7 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -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 */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
17 changes: 17 additions & 0 deletions Smilies Extra/Keyboard/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>1C8F.1</string>
</array>
</dict>
</array>
</dict>
</plist>

0 comments on commit 9a17487

Please sign in to comment.