Skip to content

Commit

Permalink
Merge pull request #99 from 87kangsw/feature/privacy-manifest
Browse files Browse the repository at this point in the history
Privacy manifest
  • Loading branch information
87kangsw authored Apr 24, 2024
2 parents fe01cd1 + 95d3af8 commit d376294
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
12 changes: 6 additions & 6 deletions GitTime/Sources/Network/GitTimeProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ class GitTimeProvider<Target: TargetType>: MoyaProvider<Target> {
.asObservable()
.do(onNext: { value in
let message = "SUCCESS: \(requestString) (\(value))"
log.debug(message, #file, #function, line: #line)
log.debug("\(message), \(#file), \(#function), line: \(#line)")
}, onError: { [weak self] error in
if let response = (error as? MoyaError)?.response {
if let jsonObject = try? response.mapJSON(failsOnEmptyData: false) {
let message = "FAILURE: \(requestString) (\(response.statusCode))\n\(jsonObject)"
log.warning(message, #file, #function, line: #line)
log.warning("\(message), \(#file), \(#function), line: \(#line)")
if response.statusCode == 403 {
self?.showErrorMessageToast("API rate limit exceeded..\nPlease wait a moment. 🙏")
} else {
self?.showErrorMessageToast(error.localizedDescription)
}
} else if let rawString = String(data: response.data, encoding: .utf8) {
let message = "FAILURE: \(requestString) (\(response.statusCode))\n\(rawString)"
log.warning(message, #file, #function, line: #line)
log.warning("\(message), \(#file), \(#function), line: \(#line)")
} else {
let message = "FAILURE: \(requestString) (\(response.statusCode))"
log.warning(message, #file, #function, line: #line)
log.warning("\(message), \(#file), \(#function), line: \(#line)")
}
} else {
let message = "FAILURE: \(requestString)\n\(error)"
log.warning(message, #file, #function, line: #line)
log.warning("\(message), \(#file), \(#function), line: \(#line)")
}
}, onSubscribed: {
let message = "REQUEST: \(requestString)"
log.debug(message, #file, #function, line: #line)
log.debug("\(message), \(#file), \(#function), line: \(#line)")
})
}

Expand Down
6 changes: 5 additions & 1 deletion GitTime/Sources/Utils/Extensions/UIColor+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ extension UIColor {
hexFormatted = String(hexFormatted.dropFirst())
}

assert(hexFormatted.count == 6, "Invalid hex code used.")
//assert(hexFormatted.count == 6, "Invalid hex code used.")
guard hexFormatted.count == 6 else {
self.init(.clear)
return
}

var rgbValue: UInt64 = 0
Scanner(string: hexFormatted).scanHexInt64(&rgbValue)
Expand Down
25 changes: 25 additions & 0 deletions GitTime/Supporting Files/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
14 changes: 7 additions & 7 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ options:
packages:
ReactorKit:
url: https://github.com/ReactorKit/ReactorKit
from: 3.0.0
from: 3.2.0
RxSwift:
url: https://github.com/ReactiveX/RxSwift
from: 6.2.0
Expand All @@ -26,7 +26,7 @@ packages:
from: 15.0.0
SnapKit:
url: https://github.com/SnapKit/SnapKit
from: 5.0.1
from: 5.7.1
PanModal:
url: https://github.com/slackhq/PanModal
from: 1.2.7
Expand All @@ -35,16 +35,16 @@ packages:
from: 4.2.2
RealmSwift:
url: https://github.com/realm/realm-swift
from: 10.15.1
from: 10.49.2
Kingfisher:
url: https://github.com/onevcat/Kingfisher
from: 7.0.0
from: 7.10.2
SwiftyBeaver:
url: https://github.com/SwiftyBeaver/SwiftyBeaver
from: 1.9.5
from: 2.0.2
Kanna:
url: https://github.com/tid-kijyun/Kanna.git
from: 5.2.7
from: 5.3.0
Then:
url: https://github.com/devxoul/Then
from: 2.7.0
Expand All @@ -53,7 +53,7 @@ packages:
from: 3.0.0
Firebase:
url: https://github.com/firebase/firebase-ios-sdk
from: 10.0.0
from: 10.24.0
Toaster:
url: https://github.com/devxoul/Toaster.git
branch: master
Expand Down

0 comments on commit d376294

Please sign in to comment.