diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 4f287d6dd..98caf2775 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -441,6 +441,7 @@ DBBF1DCB2652539E00E5B703 /* AutoCompleteItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBBF1DCA2652539E00E5B703 /* AutoCompleteItem.swift */; }; DBC7A672260C897100E57475 /* StatusContentWarningEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC7A671260C897100E57475 /* StatusContentWarningEditorView.swift */; }; DBC7A67C260DFADE00E57475 /* StatusPublishService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC7A67B260DFADE00E57475 /* StatusPublishService.swift */; }; + DBCBCBF4267CB070000F5B51 /* Decode85.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCBCBF3267CB070000F5B51 /* Decode85.swift */; }; DBCBED1726132DB500B49291 /* UserTimelineViewModel+Diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCBED1626132DB500B49291 /* UserTimelineViewModel+Diffable.swift */; }; DBCBED1D26132E1A00B49291 /* StatusFetchedResultsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCBED1C26132E1A00B49291 /* StatusFetchedResultsController.swift */; }; DBCC3B30261440A50045B23D /* UITabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCC3B2F261440A50045B23D /* UITabBarController.swift */; }; @@ -466,7 +467,6 @@ DBE54ACC2636C8FD004E7C0B /* NotificationPreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBE54AC52636C89F004E7C0B /* NotificationPreference.swift */; }; DBF8AE16263293E400C9C23C /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF8AE15263293E400C9C23C /* NotificationService.swift */; }; DBF8AE1A263293E400C9C23C /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = DBF8AE13263293E400C9C23C /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - DBF8AE862632992800C9C23C /* Base85 in Frameworks */ = {isa = PBXBuildFile; productRef = DBF8AE852632992800C9C23C /* Base85 */; }; DBF96326262EC0A6001D8D25 /* AuthenticationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBF96325262EC0A6001D8D25 /* AuthenticationServices.framework */; }; DBF9814A265E24F500E4BA07 /* ProfileFieldCollectionViewHeaderFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF98149265E24F500E4BA07 /* ProfileFieldCollectionViewHeaderFooterView.swift */; }; DBF9814C265E339500E4BA07 /* ProfileFieldAddEntryCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF9814B265E339500E4BA07 /* ProfileFieldAddEntryCollectionViewCell.swift */; }; @@ -1013,6 +1013,7 @@ DBBF1DCA2652539E00E5B703 /* AutoCompleteItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoCompleteItem.swift; sourceTree = ""; }; DBC7A671260C897100E57475 /* StatusContentWarningEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusContentWarningEditorView.swift; sourceTree = ""; }; DBC7A67B260DFADE00E57475 /* StatusPublishService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusPublishService.swift; sourceTree = ""; }; + DBCBCBF3267CB070000F5B51 /* Decode85.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Decode85.swift; sourceTree = ""; }; DBCBED1626132DB500B49291 /* UserTimelineViewModel+Diffable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserTimelineViewModel+Diffable.swift"; sourceTree = ""; }; DBCBED1C26132E1A00B49291 /* StatusFetchedResultsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusFetchedResultsController.swift; sourceTree = ""; }; DBCC3B2F261440A50045B23D /* UITabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITabBarController.swift; sourceTree = ""; }; @@ -1120,7 +1121,6 @@ files = ( DB00CA972632DDB600A54956 /* CommonOSLog in Frameworks */, DB6D9F42263527CE008423CD /* AlamofireImage in Frameworks */, - DBF8AE862632992800C9C23C /* Base85 in Frameworks */, DB6804A52637CDCC00430867 /* AppShared.framework in Frameworks */, B914FC6B0B8AF18573C0B291 /* Pods_NotificationService.framework in Frameworks */, ); @@ -2447,6 +2447,7 @@ DBF8AE15263293E400C9C23C /* NotificationService.swift */, DB6D9F3426351B7A008423CD /* NotificationService+Decrypt.swift */, DB68045A2636DC6A00430867 /* MastodonNotification.swift */, + DBCBCBF3267CB070000F5B51 /* Decode85.swift */, DBF8AE17263293E400C9C23C /* Info.plist */, ); path = NotificationService; @@ -2629,7 +2630,6 @@ ); name = NotificationService; packageProductDependencies = ( - DBF8AE852632992800C9C23C /* Base85 */, DB00CA962632DDB600A54956 /* CommonOSLog */, DB6D9F41263527CE008423CD /* AlamofireImage */, ); @@ -2695,7 +2695,6 @@ 2D939AC625EE14620076FA61 /* XCRemoteSwiftPackageReference "TOCropViewController" */, DB9A487C2603456B008B817C /* XCRemoteSwiftPackageReference "UITextView-Placeholder" */, DBB525062611EAC0002F1F29 /* XCRemoteSwiftPackageReference "Tabman" */, - DBF8AE842632992700C9C23C /* XCRemoteSwiftPackageReference "Base85" */, DB6804722637CC1200430867 /* XCRemoteSwiftPackageReference "KeychainAccess" */, DB6F5E30264E7410009108F4 /* XCRemoteSwiftPackageReference "TwitterTextEditor" */, DBAEDE5D267A0B1500D25FF5 /* XCRemoteSwiftPackageReference "Nuke" */, @@ -3406,6 +3405,7 @@ DBE54ABF2636C889004E7C0B /* UserDefaults.swift in Sources */, DB6D9F3526351B7A008423CD /* NotificationService+Decrypt.swift in Sources */, DB6804662636DC9000430867 /* String.swift in Sources */, + DBCBCBF4267CB070000F5B51 /* Decode85.swift in Sources */, DBF8AE16263293E400C9C23C /* NotificationService.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3630,7 +3630,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -3638,7 +3638,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.6.3; + MARKETING_VERSION = 0.7.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3657,7 +3657,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -3665,7 +3665,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.6.3; + MARKETING_VERSION = 0.7.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3920,7 +3920,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -3928,7 +3928,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.6.3; + MARKETING_VERSION = 0.7.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -3943,7 +3943,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -3951,7 +3951,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.6.3; + MARKETING_VERSION = 0.7.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4134,14 +4134,6 @@ minimumVersion = 2.11.0; }; }; - DBF8AE842632992700C9C23C /* XCRemoteSwiftPackageReference "Base85" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/MainasuK/Base85.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.0.1; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -4219,11 +4211,6 @@ package = DBB525062611EAC0002F1F29 /* XCRemoteSwiftPackageReference "Tabman" */; productName = Tabman; }; - DBF8AE852632992800C9C23C /* Base85 */ = { - isa = XCSwiftPackageProductDependency; - package = DBF8AE842632992700C9C23C /* XCRemoteSwiftPackageReference "Base85" */; - productName = Base85; - }; /* End XCSwiftPackageProductDependency section */ /* Begin XCVersionGroup section */ diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index 65ead656e..2fb2d9806 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ CoreDataStack.xcscheme_^#shared#^_ orderHint - 16 + 17 Mastodon - RTL.xcscheme_^#shared#^_ @@ -27,12 +27,12 @@ Mastodon.xcscheme_^#shared#^_ orderHint - 3 + 2 NotificationService.xcscheme_^#shared#^_ orderHint - 17 + 16 SuppressBuildableAutocreation diff --git a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved index 500c37d34..1ca83d0d7 100644 --- a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/Alamofire/Alamofire.git", "state": { "branch": null, - "revision": "4d19ad82f80cc71ff829b941ded114c56f4f604c", - "version": "5.4.2" + "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", + "version": "5.4.3" } }, { @@ -37,15 +37,6 @@ "version": "3.1.0" } }, - { - "package": "Base85", - "repositoryURL": "https://github.com/MainasuK/Base85.git", - "state": { - "branch": null, - "revision": "626be96816618689627f806b5c875b5adb6346ef", - "version": "1.0.1" - } - }, { "package": "CommonOSLog", "repositoryURL": "https://github.com/MainasuK/CommonOSLog", diff --git a/Mastodon/Helper/MastodonStatusContent.swift b/Mastodon/Helper/MastodonStatusContent.swift index dbeb26473..5dbef4991 100755 --- a/Mastodon/Helper/MastodonStatusContent.swift +++ b/Mastodon/Helper/MastodonStatusContent.swift @@ -15,7 +15,7 @@ enum MastodonStatusContent { typealias EmojiShortcode = String typealias EmojiDict = [EmojiShortcode: URL] - static let workingQueue = DispatchQueue(label: "org.joinmastodon.app.ActiveLabel.working-queue", qos: .userInteractive, attributes: .concurrent) + static let workingQueue = DispatchQueue(label: "org.joinmastodon.app.ActiveLabel.working-queue", qos: .userInteractive) static func parseResult(content: String, emojiDict: MastodonStatusContent.EmojiDict) -> AnyPublisher { return Future { promise in diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json index 855b1ac0c..625cb0904 100644 --- a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "notification-icon@2x.png", + "filename" : "Icon-Small-40.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" @@ -13,37 +13,37 @@ "size" : "20x20" }, { - "filename" : "icon-small@2x.png", + "filename" : "Icon-Small@2x-1.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { - "filename" : "icon-small@3x.png", + "filename" : "Icon-Small@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { - "filename" : "icon-40@2x.png", + "filename" : "Icon-Small-40@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { - "filename" : "icon-40@3x.png", + "filename" : "Icon-60@2x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { - "filename" : "icon-60@2x.png", + "filename" : "icon-60@2x-1.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { - "filename" : "icon-60@3x.png", + "filename" : "Icon-60@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" @@ -55,55 +55,55 @@ "size" : "20x20" }, { - "filename" : "notification-icon~ipad@2x.png", + "filename" : "Icon-Small-41.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { - "filename" : "icon-small.png", + "filename" : "Icon-Small.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { - "filename" : "icon-small@2x-1.png", + "filename" : "Icon-Small@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { - "filename" : "icon-40.png", + "filename" : "Icon-Small-42.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { - "filename" : "icon-40@2x-1.png", + "filename" : "Icon-Small-40@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { - "filename" : "icon-76.png", + "filename" : "Icon-76.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { - "filename" : "icon-76@2x.png", + "filename" : "Icon-76@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { - "filename" : "icon-83.5@2x.png", + "filename" : "Icon-83.5@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { - "filename" : "ios-marketing.png", + "filename" : "iTunesArtwork@2x.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 000000000..ef12e2f50 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 000000000..3057b7780 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 000000000..42cdffed8 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 000000000..aea203fb5 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 000000000..69c2b4e9e Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png new file mode 100644 index 000000000..63350076c Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png new file mode 100644 index 000000000..3a92c0d61 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png new file mode 100644 index 000000000..3a92c0d61 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png new file mode 100644 index 000000000..63350076c Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png new file mode 100644 index 000000000..63350076c Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png new file mode 100644 index 000000000..26a937e35 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png new file mode 100644 index 000000000..d9296bdb7 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png new file mode 100644 index 000000000..d9296bdb7 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png new file mode 100644 index 000000000..e98e3f3cf Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png new file mode 100644 index 000000000..cc435d6f6 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png deleted file mode 100644 index babb8385a..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png deleted file mode 100644 index 2f4206a15..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png deleted file mode 100644 index 2f4206a15..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png deleted file mode 100644 index f1f48ea8f..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png new file mode 100644 index 000000000..96cde3e35 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png deleted file mode 100644 index f1f48ea8f..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png deleted file mode 100644 index 7914c712f..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png deleted file mode 100644 index 91aa9bb44..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png deleted file mode 100644 index e1ca5eea0..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png deleted file mode 100644 index f1d7b0a84..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png deleted file mode 100644 index 1781cfe3b..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x-1.png deleted file mode 100644 index 020959c54..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x-1.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png deleted file mode 100644 index 020959c54..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png deleted file mode 100644 index 952360a2a..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png deleted file mode 100644 index a61786157..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png deleted file mode 100644 index babb8385a..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png index 86e3830ad..7f6f672fa 100644 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png index 31fab9f87..5eaa5fce1 100644 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png deleted file mode 100644 index babb8385a..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png and /dev/null differ diff --git a/Mastodon/Service/NotificationService.swift b/Mastodon/Service/NotificationService.swift index f1a5bb49c..76e9b5226 100644 --- a/Mastodon/Service/NotificationService.swift +++ b/Mastodon/Service/NotificationService.swift @@ -54,7 +54,7 @@ final class NotificationService { guard let _ = self else { return } guard let deviceToken = deviceToken else { return } let token = [UInt8](deviceToken).toHexString() - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: deviceToken: %s", ((#file as NSString).lastPathComponent), #line, #function, token) + os_log(.info, log: .api, "%{public}s[%{public}ld], %{public}s: deviceToken: %s", ((#file as NSString).lastPathComponent), #line, #function, token) } .store(in: &disposeBag) } diff --git a/Mastodon/Service/SettingService.swift b/Mastodon/Service/SettingService.swift index f0375bad2..7a25d6c7b 100644 --- a/Mastodon/Service/SettingService.swift +++ b/Mastodon/Service/SettingService.swift @@ -158,12 +158,12 @@ final class SettingService { .sink { completion in switch completion { case .failure(let error): - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: [Push Notification] subscribe failure: %s", ((#file as NSString).lastPathComponent), #line, #function, error.localizedDescription) + os_log(.info, log: .api, "%{public}s[%{public}ld], %{public}s: [Push Notification] subscribe failure: %s", ((#file as NSString).lastPathComponent), #line, #function, error.localizedDescription) case .finished: - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: [Push Notification] subscribe success", ((#file as NSString).lastPathComponent), #line, #function) + os_log(.info, log: .default, "%{public}s[%{public}ld], %{public}s: [Push Notification] subscribe success", ((#file as NSString).lastPathComponent), #line, #function) } - } receiveValue: { _ in - // do nothing + } receiveValue: { response in + os_log(.info, log: .default, "%{public}s[%{public}ld], %{public}s: [Push Notification] subscribe response: %s", ((#file as NSString).lastPathComponent), #line, #function, response.value.endpoint) } .store(in: &self.disposeBag) }) diff --git a/NotificationService/Decode85.swift b/NotificationService/Decode85.swift new file mode 100644 index 000000000..612a14022 --- /dev/null +++ b/NotificationService/Decode85.swift @@ -0,0 +1,45 @@ +import Foundation + +private let DecodeTable: [UInt32] = [ + 0xff, 0x44, 0xff, 0x54, 0x53, 0x52, 0x48, 0xff, + 0x4b, 0x4c, 0x46, 0x41, 0xff, 0x3f, 0x3e, 0x45, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x40, 0xff, 0x49, 0x42, 0x4a, 0x47, + 0x51, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, + 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, + 0x3b, 0x3c, 0x3d, 0x4d, 0xff, 0x4e, 0x43, 0xff, + 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x4f, 0xff, 0x50, 0xff, 0xff +] + +extension String { + func decode85() -> Data { + var data = Data() + var block: UInt32 = 0 + var n = 0 + for c in utf8 { + if c >= 32, c < 128, DecodeTable[Int(c - 32)] != 0xff { + let value = DecodeTable[Int(c - 32)] + block = block * 85 + value + n += 1 + if n == 5 { + data.append(UInt8(block >> 24)) + data.append(UInt8((block >> 16) & 0xff)) + data.append(UInt8((block >> 8) & 0xff)) + data.append(UInt8(block & 0xff)) + block = 0 + n = 0 + } + } + } + + if n >= 4 { data.append(UInt8((block >> 16) & 0xff)) } + if n >= 3 { data.append(UInt8((block >> 8) & 0xff)) } + if n >= 2 { data.append(UInt8(block & 0xff)) } + + return data + } +} diff --git a/NotificationService/NotificationService.swift b/NotificationService/NotificationService.swift index 08ba12be4..5bc7252b0 100644 --- a/NotificationService/NotificationService.swift +++ b/NotificationService/NotificationService.swift @@ -9,7 +9,6 @@ import UserNotifications import CommonOSLog import CryptoKit import AlamofireImage -import Base85 import AppShared class NotificationService: UNNotificationServiceExtension { @@ -28,12 +27,12 @@ class NotificationService: UNNotificationServiceExtension { let privateKey = AppSecret.default.notificationPrivateKey let auth = AppSecret.default.notificationAuth - guard let encodedPayload = bestAttemptContent.userInfo["p"] as? String, - let payload = Data(base85Encoded: encodedPayload, options: [], encoding: .z85) else { + guard let encodedPayload = bestAttemptContent.userInfo["p"] as? String else { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: invalid payload", ((#file as NSString).lastPathComponent), #line, #function) contentHandler(bestAttemptContent) return } + let payload = encodedPayload.decode85() guard let encodedPublicKey = bestAttemptContent.userInfo["k"] as? String, let publicKey = NotificationService.publicKey(encodedPublicKey: encodedPublicKey) else { @@ -42,13 +41,13 @@ class NotificationService: UNNotificationServiceExtension { return } - guard let encodedSalt = bestAttemptContent.userInfo["s"] as? String, - let salt = Data(base85Encoded: encodedSalt, options: [], encoding: .z85) else { + guard let encodedSalt = bestAttemptContent.userInfo["s"] as? String else { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: invalid salt", ((#file as NSString).lastPathComponent), #line, #function) contentHandler(bestAttemptContent) return } - + let salt = encodedSalt.decode85() + guard let plaintextData = NotificationService.decrypt(payload: payload, salt: salt, auth: auth, privateKey: privateKey, publicKey: publicKey), let notification = try? JSONDecoder().decode(MastodonPushNotification.self, from: plaintextData) else { contentHandler(bestAttemptContent) @@ -102,7 +101,7 @@ class NotificationService: UNNotificationServiceExtension { extension NotificationService { static func publicKey(encodedPublicKey: String) -> P256.KeyAgreement.PublicKey? { - guard let publicKeyData = Data(base85Encoded: encodedPublicKey, options: [], encoding: .z85) else { return nil } + let publicKeyData = encodedPublicKey.decode85() return try? P256.KeyAgreement.PublicKey(x963Representation: publicKeyData) } }