From 38d5c5add90142af585d7c7458dc4f0eefa65a52 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 17 Jan 2024 21:39:28 +0800 Subject: [PATCH] bump deps Signed-off-by: Bugen Zhao --- app/MNGA.xcodeproj/project.pbxproj | 72 +++------- .../xcshareddata/swiftpm/Package.resolved | 59 +++----- .../AppIcon.appiconset/Contents.json | 134 ++++++++++-------- app/Shared/Models/PagingDataSource.swift | 30 +--- app/Shared/Views/AboutView.swift | 4 +- app/Shared/Views/AttachmentsView.swift | 2 +- app/Shared/Views/BlockWordListView.swift | 6 +- app/Shared/Views/ContentImageView.swift | 4 +- app/Shared/Views/ForumIconView.swift | 2 +- app/Shared/Views/PostContentView.swift | 2 +- app/Shared/Views/PostRowView.swift | 4 +- app/Shared/Views/TextSelectionView.swift | 2 +- app/Shared/Views/UserView.swift | 2 +- .../Modifiers/CellContextMenuModifier.swift | 11 +- app/iOS/Views/ContentEditorView.swift | 2 +- 15 files changed, 137 insertions(+), 199 deletions(-) diff --git a/app/MNGA.xcodeproj/project.pbxproj b/app/MNGA.xcodeproj/project.pbxproj index dbb59a32..1a3b2a14 100644 --- a/app/MNGA.xcodeproj/project.pbxproj +++ b/app/MNGA.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ B404C49E270C73EC00FF1743 /* Platform.swift in Sources */ = {isa = PBXBuildFile; fileRef = B404C49C270C73EC00FF1743 /* Platform.swift */; }; B404C4A0270C788100FF1743 /* AppActivityView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B404C49F270C788100FF1743 /* AppActivityView.swift */; }; B404C4A2270C790A00FF1743 /* ContentEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B404C4A1270C790A00FF1743 /* ContentEditorView.swift */; }; - B404C4A8270C8E1000FF1743 /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = B404C4A7270C8E1000FF1743 /* Introspect */; }; B404C4AA270D662900FF1743 /* ShareMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = B404C4A9270D662600FF1743 /* ShareMenu.swift */; }; B404C4B2270D734A00FF1743 /* DismissableStubView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B404C4B1270D734A00FF1743 /* DismissableStubView.swift */; }; B404C4F9270D9EBA00FF1743 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B43DEDAB269F0951009C52F5 /* WidgetKit.framework */; platformFilter = maccatalyst; }; @@ -101,7 +100,6 @@ B42BA73F2720561D004D46EB /* ContentEditorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42BA73D2720561D004D46EB /* ContentEditorModel.swift */; }; B42BA74127205943004D46EB /* ShortMessageEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42BA74027205943004D46EB /* ShortMessageEditorView.swift */; }; B42BA74227205943004D46EB /* ShortMessageEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42BA74027205943004D46EB /* ShortMessageEditorView.swift */; }; - B437B279269B09DC0092FF9E /* SwiftUIRefresh in Frameworks */ = {isa = PBXBuildFile; productRef = B437B278269B09DC0092FF9E /* SwiftUIRefresh */; }; B437B27C269B0E190092FF9E /* ToolbarModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B437B27B269B0E190092FF9E /* ToolbarModifier.swift */; }; B43DED46269C29BB009C52F5 /* DateTimeTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B43DED45269C29BB009C52F5 /* DateTimeTextView.swift */; }; B43DED47269C29BB009C52F5 /* DateTimeTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B43DED45269C29BB009C52F5 /* DateTimeTextView.swift */; }; @@ -228,7 +226,6 @@ B4CF7E92270B2A8D00E7C374 /* RecommendedTopicListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4CF7E90270B2A8C00E7C374 /* RecommendedTopicListView.swift */; }; B4D13B9C27020A8C009506A2 /* TopicPostRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D13B9B27020A8C009506A2 /* TopicPostRowView.swift */; }; B4D13B9D27020A8C009506A2 /* TopicPostRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D13B9B27020A8C009506A2 /* TopicPostRowView.swift */; }; - B4D34D3A2749FF6D0068A23C /* SwiftUINavigation in Frameworks */ = {isa = PBXBuildFile; productRef = B4D34D392749FF6D0068A23C /* SwiftUINavigation */; }; B4D34D3C274A148F0068A23C /* AttachmentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D34D3B274A148F0068A23C /* AttachmentsView.swift */; }; B4D34D3D274A148F0068A23C /* AttachmentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D34D3B274A148F0068A23C /* AttachmentsView.swift */; }; B4DBF608268976470027233F /* DateFormatters.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4DBF607268976470027233F /* DateFormatters.swift */; }; @@ -278,6 +275,7 @@ B4E10724268DD2A4006C1742 /* AuthInfoDebug.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E10722268DD2A4006C1742 /* AuthInfoDebug.swift */; }; B4E2BDD226922A5E0080C790 /* TopicHistoryListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E2BDD126922A5E0080C790 /* TopicHistoryListView.swift */; }; B4E2BDD326922A5E0080C790 /* TopicHistoryListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4E2BDD126922A5E0080C790 /* TopicHistoryListView.swift */; }; + B4E39C4F2ABDFEA600256DD9 /* SwiftUIIntrospect in Frameworks */ = {isa = PBXBuildFile; productRef = B4E39C4E2ABDFEA600256DD9 /* SwiftUIIntrospect */; }; B4EA154E2740F2F200C0308B /* AlertToast in Frameworks */ = {isa = PBXBuildFile; productRef = B4EA154D2740F2F200C0308B /* AlertToast */; }; B4EA15502740F30000C0308B /* AlertToast in Frameworks */ = {isa = PBXBuildFile; productRef = B4EA154F2740F30000C0308B /* AlertToast */; }; B4EB80E3269B0F290014DDFA /* ToolbarModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B437B27B269B0E190092FF9E /* ToolbarModifier.swift */; }; @@ -495,9 +493,8 @@ B4C7F011273EBFF400F64A88 /* logic-ios.xcframework in Frameworks */, B4C024ED268850E800E53554 /* SwiftProtobuf in Frameworks */, B4E10716268DADEE006C1742 /* WebView in Frameworks */, - B437B279269B09DC0092FF9E /* SwiftUIRefresh in Frameworks */, - B4D34D3A2749FF6D0068A23C /* SwiftUINavigation in Frameworks */, B45819CC268DA17D00999830 /* SwiftUIX in Frameworks */, + B4E39C4F2ABDFEA600256DD9 /* SwiftUIIntrospect in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -512,7 +509,6 @@ B4C024F0268850F300E53554 /* SwiftProtobuf in Frameworks */, B404C497270C71F600FF1743 /* Colorful in Frameworks */, B4E10718268DADF5006C1742 /* WebView in Frameworks */, - B404C4A8270C8E1000FF1743 /* Introspect in Frameworks */, B45819CE268DA18600999830 /* SwiftUIX in Frameworks */, B404C495270C71DC00FF1743 /* BetterSafariView in Frameworks */, ); @@ -897,13 +893,12 @@ B45819CB268DA17D00999830 /* SwiftUIX */, B4E10715268DADEE006C1742 /* WebView */, B412F706268DFC4600EB0614 /* Logging */, - B437B278269B09DC0092FF9E /* SwiftUIRefresh */, B409252526D29F6C00BCB666 /* BetterSafariView */, B4CF7E8E270AE04A00E7C374 /* Colorful */, B41BC0DC271C7E5D00DD05F2 /* CombineExt */, B4EA154D2740F2F200C0308B /* AlertToast */, B4BDE1372746A5F300F0607E /* Crossroad */, - B4D34D392749FF6D0068A23C /* SwiftUINavigation */, + B4E39C4E2ABDFEA600256DD9 /* SwiftUIIntrospect */, ); productName = "NGA (iOS)"; productReference = B4C024C826884FD700E53554 /* MNGA.app */; @@ -930,7 +925,6 @@ B412F708268DFC4F00EB0614 /* Logging */, B404C494270C71DC00FF1743 /* BetterSafariView */, B404C496270C71F600FF1743 /* Colorful */, - B404C4A7270C8E1000FF1743 /* Introspect */, B4EA154F2740F30000C0308B /* AlertToast */, ); productName = "NGA (macOS)"; @@ -977,14 +971,12 @@ B45819CA268DA17D00999830 /* XCRemoteSwiftPackageReference "SwiftUIX" */, B4E10714268DADEE006C1742 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */, B412F705268DFC4600EB0614 /* XCRemoteSwiftPackageReference "swift-log" */, - B4920CD22690224F00762FC9 /* XCRemoteSwiftPackageReference "SwiftUIRefresh" */, B409252426D29F6C00BCB666 /* XCRemoteSwiftPackageReference "BetterSafariView" */, B4CF7E8D270AE04A00E7C374 /* XCRemoteSwiftPackageReference "Colorful" */, - B404C4A6270C8E1000FF1743 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */, B41BC0DB271C7E5C00DD05F2 /* XCRemoteSwiftPackageReference "CombineExt" */, B4EA154C2740F2F200C0308B /* XCRemoteSwiftPackageReference "AlertToast" */, B4BDE1362746A5F300F0607E /* XCRemoteSwiftPackageReference "Crossroad" */, - B4D34D382749FF6D0068A23C /* XCRemoteSwiftPackageReference "swiftui-navigation" */, + B4E39C4D2ABDFEA600256DD9 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */, ); productRefGroup = B4C024C926884FD700E53554 /* Products */; projectDirPath = ""; @@ -1456,6 +1448,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -1523,6 +1516,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -1616,8 +1610,8 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_ENTITLEMENTS = MNGA.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 87F9J2DF6R; ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; @@ -1630,7 +1624,7 @@ MARKETING_VERSION = 1.1.2; PRODUCT_BUNDLE_IDENTIFIER = com.bugenzhao.MNGA; PRODUCT_NAME = MNGA; - PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.bugenzhao.MNGA"; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; @@ -1745,14 +1739,6 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - B404C4A6270C8E1000FF1743 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/siteline/SwiftUI-Introspect"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.1.3; - }; - }; B409252426D29F6C00BCB666 /* XCRemoteSwiftPackageReference "BetterSafariView" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/stleamist/BetterSafariView"; @@ -1793,14 +1779,6 @@ minimumVersion = 0.1.0; }; }; - B4920CD22690224F00762FC9 /* XCRemoteSwiftPackageReference "SwiftUIRefresh" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/siteline/SwiftUIRefresh"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.0.3; - }; - }; B4BDE1362746A5F300F0607E /* XCRemoteSwiftPackageReference "Crossroad" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/giginet/Crossroad"; @@ -1825,20 +1803,20 @@ minimumVersion = 1.0.0; }; }; - B4D34D382749FF6D0068A23C /* XCRemoteSwiftPackageReference "swiftui-navigation" */ = { + B4E10714268DADEE006C1742 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/pointfreeco/swiftui-navigation.git"; + repositoryURL = "https://github.com/kylehickinson/SwiftUI-WebView"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 0.1.0; + minimumVersion = 0.3.0; }; }; - B4E10714268DADEE006C1742 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */ = { + B4E39C4D2ABDFEA600256DD9 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/kylehickinson/SwiftUI-WebView"; + repositoryURL = "https://github.com/siteline/SwiftUI-Introspect"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 0.3.0; + minimumVersion = 1.0.0; }; }; B4EA154C2740F2F200C0308B /* XCRemoteSwiftPackageReference "AlertToast" */ = { @@ -1862,11 +1840,6 @@ package = B4CF7E8D270AE04A00E7C374 /* XCRemoteSwiftPackageReference "Colorful" */; productName = Colorful; }; - B404C4A7270C8E1000FF1743 /* Introspect */ = { - isa = XCSwiftPackageProductDependency; - package = B404C4A6270C8E1000FF1743 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */; - productName = Introspect; - }; B409252526D29F6C00BCB666 /* BetterSafariView */ = { isa = XCSwiftPackageProductDependency; package = B409252426D29F6C00BCB666 /* XCRemoteSwiftPackageReference "BetterSafariView" */; @@ -1912,11 +1885,6 @@ package = B41BC0DB271C7E5C00DD05F2 /* XCRemoteSwiftPackageReference "CombineExt" */; productName = CombineExt; }; - B437B278269B09DC0092FF9E /* SwiftUIRefresh */ = { - isa = XCSwiftPackageProductDependency; - package = B4920CD22690224F00762FC9 /* XCRemoteSwiftPackageReference "SwiftUIRefresh" */; - productName = SwiftUIRefresh; - }; B45819C6268D9B5600999830 /* SDWebImageSwiftUI */ = { isa = XCSwiftPackageProductDependency; package = B45819C5268D9B5600999830 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */; @@ -1957,11 +1925,6 @@ package = B4CF7E8D270AE04A00E7C374 /* XCRemoteSwiftPackageReference "Colorful" */; productName = Colorful; }; - B4D34D392749FF6D0068A23C /* SwiftUINavigation */ = { - isa = XCSwiftPackageProductDependency; - package = B4D34D382749FF6D0068A23C /* XCRemoteSwiftPackageReference "swiftui-navigation" */; - productName = SwiftUINavigation; - }; B4E10715268DADEE006C1742 /* WebView */ = { isa = XCSwiftPackageProductDependency; package = B4E10714268DADEE006C1742 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */; @@ -1972,6 +1935,11 @@ package = B4E10714268DADEE006C1742 /* XCRemoteSwiftPackageReference "SwiftUI-WebView" */; productName = WebView; }; + B4E39C4E2ABDFEA600256DD9 /* SwiftUIIntrospect */ = { + isa = XCSwiftPackageProductDependency; + package = B4E39C4D2ABDFEA600256DD9 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */; + productName = SwiftUIIntrospect; + }; B4EA154D2740F2F200C0308B /* AlertToast */ = { isa = XCSwiftPackageProductDependency; package = B4EA154C2740F2F200C0308B /* XCRemoteSwiftPackageReference "AlertToast" */; diff --git a/app/MNGA.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/app/MNGA.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 44ed8fa0..d51b7dc5 100644 --- a/app/MNGA.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/app/MNGA.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/stleamist/BetterSafariView", "state" : { - "revision" : "be7248720af18c57c7a1348b20f6212379b28c6b", - "version" : "2.4.0" + "revision" : "884533749e55949b2566030948c6fdbe2873ed0c", + "version" : "2.4.2" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/CombineCommunity/CombineExt", "state" : { - "revision" : "aaf1a0981c05360000af972473034cb952be4ca0", - "version" : "1.8.0" + "revision" : "d7b896fa9ca8b47fa7bcde6b43ef9b70bf8c1f56", + "version" : "1.8.1" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/SDWebImage/SDWebImage.git", "state" : { - "revision" : "3e48cb68d8e668d146dc59c73fb98cb628616236", - "version" : "5.13.2" + "revision" : "59730af512c06fb569c119d737df4c1c499e001d", + "version" : "5.18.10" } }, { @@ -59,17 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI", "state" : { - "revision" : "cd8625b7cf11a97698e180d28bb7d5d357196678", - "version" : "2.0.2" - } - }, - { - "identity" : "swift-case-paths", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-case-paths", - "state" : { - "revision" : "7346701ea29da0a85d4403cf3d7a589a58ae3dee", - "version" : "0.9.2" + "revision" : "261b6cec35686d2dc192b809ab50742b4502a73b", + "version" : "2.2.6" } }, { @@ -77,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log", "state" : { - "revision" : "6fe203dc33195667ce1759bf0182975e4653ba1c", - "version" : "1.4.4" + "revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed", + "version" : "1.5.3" } }, { @@ -86,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf", "state" : { - "revision" : "b8230909dedc640294d7324d37f4c91ad3dcf177", - "version" : "1.20.1" + "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", + "version" : "1.25.2" } }, { @@ -95,17 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/siteline/SwiftUI-Introspect", "state" : { - "revision" : "f2616860a41f9d9932da412a8978fec79c06fe24", - "version" : "0.1.4" - } - }, - { - "identity" : "swiftui-navigation", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swiftui-navigation.git", - "state" : { - "revision" : "7191be709528b0d0040105c7071d35fbb923d462", - "version" : "0.2.0" + "revision" : "18e965f867e37a558ad13c12d330dbe047099180", + "version" : "1.1.2" } }, { @@ -117,22 +99,13 @@ "version" : "0.3.0" } }, - { - "identity" : "swiftuirefresh", - "kind" : "remoteSourceControl", - "location" : "https://github.com/siteline/SwiftUIRefresh", - "state" : { - "revision" : "fa8fac7b5eb5c729983a8bef65f094b5e0d12014", - "version" : "0.0.3" - } - }, { "identity" : "swiftuix", "kind" : "remoteSourceControl", "location" : "https://github.com/SwiftUIX/SwiftUIX", "state" : { - "revision" : "889c781539cdd1e6a1111472c711082522aa35c6", - "version" : "0.1.2" + "revision" : "a5a22a1aaca885c229f475af049d75a6d9144de8", + "version" : "0.1.9" } } ], diff --git a/app/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json index 486e280d..2ad1d4fd 100755 --- a/app/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/app/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -150,6 +150,66 @@ "scale" : "1x", "size" : "1024x1024" }, + { + "filename" : "Icon-16.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "filename" : "Icon-32.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "filename" : "Icon-32.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "filename" : "Icon-64.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "filename" : "Icon-128.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "filename" : "Icon-256.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "filename" : "Icon-256.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "filename" : "Icon-512.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "filename" : "Icon-512.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "filename" : "Icon-1024.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + }, { "filename" : "48.png", "idiom" : "watch", @@ -225,6 +285,13 @@ "size" : "51x51", "subtype" : "45mm" }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "54x54", + "subtype" : "49mm" + }, { "filename" : "172.png", "idiom" : "watch", @@ -257,70 +324,17 @@ "subtype" : "45mm" }, { - "filename" : "1024.png", - "idiom" : "watch-marketing", - "scale" : "1x", - "size" : "1024x1024" - }, - { - "filename" : "Icon-16.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "filename" : "Icon-32.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "filename" : "Icon-32.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "filename" : "Icon-64.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "filename" : "Icon-128.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "filename" : "Icon-256.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "filename" : "Icon-256.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "filename" : "Icon-512.png", - "idiom" : "mac", + "idiom" : "watch", + "role" : "quickLook", "scale" : "2x", - "size" : "256x256" + "size" : "129x129", + "subtype" : "49mm" }, { - "filename" : "Icon-512.png", - "idiom" : "mac", + "filename" : "1024.png", + "idiom" : "watch-marketing", "scale" : "1x", - "size" : "512x512" - }, - { - "filename" : "Icon-1024.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" + "size" : "1024x1024" } ], "info" : { diff --git a/app/Shared/Models/PagingDataSource.swift b/app/Shared/Models/PagingDataSource.swift index b09fa67c..f1144996 100644 --- a/app/Shared/Models/PagingDataSource.swift +++ b/app/Shared/Models/PagingDataSource.swift @@ -10,10 +10,6 @@ import Foundation import SwiftProtobuf import SwiftUI -#if os(iOS) - import SwiftUIRefresh -#endif - class PagingDataSource: ObservableObject { private let buildRequest: (_ page: Int) -> AsyncRequest.OneOf_Value private let onResponse: (_ response: Res) -> ([Item], Int?) @@ -265,22 +261,13 @@ class PagingDataSource: ObservableObject { } extension View { - func refreshable(dataSource: PagingDataSource, iOS15Only: Bool = false, refreshWhenEnterForeground _: Bool = false) -> some View { - #if canImport(SwiftUIRefresh) - Group { - if #available(iOS 15.0, *) { - self.refreshable { - try! await Task.sleep(nanoseconds: UInt64(0.25 * Double(NSEC_PER_SEC))) - await dataSource.refreshAsync(animated: true) - try! await Task.sleep(nanoseconds: UInt64(0.25 * Double(NSEC_PER_SEC))) - } - } else if !iOS15Only { - self.pullToRefresh(isShowing: .constant(dataSource.isRefreshing)) { dataSource.refresh(animated: true) } - } else { - self - } - } -// refreshWhenEnterForeground is currently buggy + func refreshable(dataSource: PagingDataSource, iOS15Only _: Bool = false, refreshWhenEnterForeground _: Bool = false) -> some View { + refreshable { + try! await Task.sleep(nanoseconds: UInt64(0.25 * Double(NSEC_PER_SEC))) + await dataSource.refreshAsync(animated: true) + try! await Task.sleep(nanoseconds: UInt64(0.25 * Double(NSEC_PER_SEC))) + } + // refreshWhenEnterForeground is currently buggy // .onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in // guard refreshWhenEnterForeground else { return } @@ -291,8 +278,5 @@ extension View { // dataSource.refresh() // } // } - #else - self - #endif } } diff --git a/app/Shared/Views/AboutView.swift b/app/Shared/Views/AboutView.swift index 55e6447f..5c4f7259 100644 --- a/app/Shared/Views/AboutView.swift +++ b/app/Shared/Views/AboutView.swift @@ -46,7 +46,7 @@ struct OldAboutView: View { var header: some View { VStack { Button(action: { doShare() }) { - Image("RoundedIcon") + Image(.roundedIcon) .resizable() .scaledToFit() .height(200) @@ -60,7 +60,7 @@ struct OldAboutView: View { HStack(spacing: 12) { Button(action: { openGitHub() }) { - Image("github") + Image(.github) .renderingMode(.template) .resizable() .scaledToFit() diff --git a/app/Shared/Views/AttachmentsView.swift b/app/Shared/Views/AttachmentsView.swift index 84979c03..8a6027c1 100644 --- a/app/Shared/Views/AttachmentsView.swift +++ b/app/Shared/Views/AttachmentsView.swift @@ -11,7 +11,7 @@ import SwiftUI import SwiftUIX struct AttachmentsView: View { - @OptionalEnvironmentObject var image + @EnvironmentObject.Optional var image @ObservedObject var model: AttachmentsModel @Environment(\.presentationMode) var presentation diff --git a/app/Shared/Views/BlockWordListView.swift b/app/Shared/Views/BlockWordListView.swift index 5050312e..b21aa7b4 100644 --- a/app/Shared/Views/BlockWordListView.swift +++ b/app/Shared/Views/BlockWordListView.swift @@ -6,8 +6,8 @@ // import Foundation -import Introspect import SwiftUI +import SwiftUIIntrospect struct BlockWordListView: View { @StateObject var storage = BlockWordsStorage.shared @@ -26,13 +26,11 @@ struct BlockWordListView: View { if newWord != nil { HStack { TextField(LocalizedStringKey("New word"), text: ($newWord ?? .init()).word, onCommit: commitNewWord) - #if os(iOS) - .introspectTextField { + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { if newWord?.word.isEmpty == true { $0.becomeFirstResponder() } } - #endif Image(systemName: "pencil").foregroundColor(.secondary) } } diff --git a/app/Shared/Views/ContentImageView.swift b/app/Shared/Views/ContentImageView.swift index 31553540..a51fc570 100644 --- a/app/Shared/Views/ContentImageView.swift +++ b/app/Shared/Views/ContentImageView.swift @@ -18,8 +18,8 @@ struct ContentImageView: View { @Environment(\.inRealPost) var inRealPost @EnvironmentObject var viewingImage: ViewingImageModel - @OptionalEnvironmentObject var attachmentsModel - @OptionalEnvironmentObject var presendAttachmentsModel + @EnvironmentObject.Optional var attachmentsModel + @EnvironmentObject.Optional var presendAttachmentsModel init(url: URL, onlyThumbs: Bool = false) { self.url = url diff --git a/app/Shared/Views/ForumIconView.swift b/app/Shared/Views/ForumIconView.swift index 45b7e97b..bd8395b9 100644 --- a/app/Shared/Views/ForumIconView.swift +++ b/app/Shared/Views/ForumIconView.swift @@ -13,7 +13,7 @@ struct ForumIconView: View { let iconURL: String var body: some View { - let defaultIcon = Image("default_forum_icon") + let defaultIcon = Image(.defaultForumIcon) .resizable() .renderingMode(.template) diff --git a/app/Shared/Views/PostContentView.swift b/app/Shared/Views/PostContentView.swift index 738f6af3..31dbb395 100644 --- a/app/Shared/Views/PostContentView.swift +++ b/app/Shared/Views/PostContentView.swift @@ -51,7 +51,7 @@ struct PostContentView: View where S.Element == Span { self.initialInQuote = initialInQuote } - @OptionalEnvironmentObject var actionModel + @EnvironmentObject.Optional var actionModel var main: some View { let combiner = ContentCombiner(actionModel: actionModel, id: id, defaultFont: defaultFont, defaultColor: defaultColor, initialEnvs: initialInQuote ? ["inQuote": "true"] : nil) diff --git a/app/Shared/Views/PostRowView.swift b/app/Shared/Views/PostRowView.swift index b1c0edd8..e37b8d90 100644 --- a/app/Shared/Views/PostRowView.swift +++ b/app/Shared/Views/PostRowView.swift @@ -15,8 +15,8 @@ struct PostRowView: View { @Binding var vote: VotesModel.Vote - @OptionalEnvironmentObject var action - @OptionalEnvironmentObject var postReply + @EnvironmentObject.Optional var action + @EnvironmentObject.Optional var postReply @EnvironmentObject var textSelection: TextSelectionModel @Environment(\.enableAuthorOnly) var enableAuthorOnly diff --git a/app/Shared/Views/TextSelectionView.swift b/app/Shared/Views/TextSelectionView.swift index 51fb1a4b..81f9f02c 100644 --- a/app/Shared/Views/TextSelectionView.swift +++ b/app/Shared/Views/TextSelectionView.swift @@ -28,7 +28,7 @@ struct TextSelectionView: View { var body: some View { NavigationView { TextEditor(text: .constant(text)) - .introspectTextView { tv in + .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17)) { tv in tv.isEditable = false tv.selectAll(nil) } diff --git a/app/Shared/Views/UserView.swift b/app/Shared/Views/UserView.swift index 1a0f5887..f26a0527 100644 --- a/app/Shared/Views/UserView.swift +++ b/app/Shared/Views/UserView.swift @@ -28,7 +28,7 @@ struct UserView: View { @State var showId = false @StateObject var pref = PreferencesStorage.shared - @OptionalEnvironmentObject var action + @EnvironmentObject.Optional var action @EnvironmentObject var viewingImage: ViewingImageModel @State var user: User? diff --git a/app/iOS/Modifiers/CellContextMenuModifier.swift b/app/iOS/Modifiers/CellContextMenuModifier.swift index 323c25d3..be6470d3 100644 --- a/app/iOS/Modifiers/CellContextMenuModifier.swift +++ b/app/iOS/Modifiers/CellContextMenuModifier.swift @@ -63,11 +63,12 @@ struct CellContextMenuModifier: ViewModifier { interaction = UIContextMenuInteraction(delegate: delegate) } - func body(content: Content) -> some View { - content.introspectTableViewCell { cell in - cell.interactions.removeAll() - cell.addInteraction(interaction) - } + func body(content _: Content) -> some View { + EmptyView() +// content.introspectTableViewCell { cell in +// cell.interactions.removeAll() +// cell.addInteraction(interaction) +// } } } diff --git a/app/iOS/Views/ContentEditorView.swift b/app/iOS/Views/ContentEditorView.swift index 636209ad..3222bf93 100644 --- a/app/iOS/Views/ContentEditorView.swift +++ b/app/iOS/Views/ContentEditorView.swift @@ -55,7 +55,7 @@ struct ContentEditorView>: View { Section(header: Text("Content")) { ZStack(alignment: .topLeading) { // hack for dynamic height - textEditor.introspectTextView { tv in + textEditor.introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17)) { tv in if first { tv.becomeFirstResponder(); first = false } } Text(model.text).opacity(0).padding(.all, 6)