From 42198f94334168d2b3de5a97de1a7ce6e0fd9e1e Mon Sep 17 00:00:00 2001 From: Mark Chan <45706356+WindowsMEMZ@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0UI=E6=B5=8B=E8=AF=95=E5=B9=B6?= =?UTF-8?q?=E4=B8=BAwatchOS=E6=B7=BB=E5=8A=A0Radar=E5=8F=8D=E9=A6=88=20(#2?= =?UTF-8?q?67)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * opt: Optimized User Interface for visionOS * fix: fixed a build issue * Added UI Tests(Empty) and radar on watchOS --- DarockBili.xcodeproj/project.pbxproj | 144 ++++++++++- .../xcshareddata/IDETemplateMacros.plist | 2 +- .../xcschemes/MeowBili Watch App.xcscheme | 11 + .../xcshareddata/xcschemes/MeowBili.xcscheme | 20 +- Localizable.xcstrings | 51 ++++ MeowBili/Bangumi/BangumiDetailView.swift | 2 +- MeowBili/Bangumi/BangumiDownloadView.swift | 2 +- MeowBili/Bangumi/BangumiPlayerView.swift | 2 +- MeowBili/Errors/Backtrace/backtrace.c | 2 +- MeowBili/Errors/Backtrace/backtrace.h | 2 +- MeowBili/Errors/Backtrace/backtrace.swift | 2 +- MeowBili/Errors/ErrorGetView.swift | 2 +- MeowBili/Errors/FeedbackView.swift | 240 +++++++++++++++++- MeowBili/Errors/MemoryWarningView.swift | 2 +- MeowBili/Errors/NetwokFixView.swift | 2 +- MeowBili/Errors/SignalErrorView.swift | 2 +- MeowBili/Extension/AppFileManager.swift | 2 +- MeowBili/Extension/CodeExt.swift | 2 +- MeowBili/Extension/UIExt.swift | 2 +- MeowBili/GlobalView/CommentsView.swift | 2 +- MeowBili/InMain/ContentView.swift | 25 +- MeowBili/InMain/MainView.swift | 2 +- MeowBili/InMain/SearchView.swift | 2 +- MeowBili/Live/LiveDetailView.swift | 2 +- MeowBili/Live/LiveMessagesView.swift | 2 +- MeowBili/Live/LivePlayerView.swift | 2 +- MeowBili/MeowBili.xctestplan | 30 +++ MeowBili/MeowBiliApp.swift | 2 +- MeowBili/Models/Bangumi.swift | 2 +- MeowBili/Models/DownloadObj.swift | 2 +- MeowBili/Others/AboutView.swift | 2 +- MeowBili/Others/CCodes/AVExtension.h | 2 +- MeowBili/Others/CCodes/AVExtension.m | 2 +- MeowBili/Others/CCodes/CodingTime.h | 2 +- MeowBili/Others/CCodes/CodingTime.m | 2 +- MeowBili/Others/CCodes/NowPlayingExtension.h | 2 +- MeowBili/Others/CCodes/NowPlayingExtension.m | 2 +- MeowBili/Others/CCodes/OCCodeExt.h | 2 +- MeowBili/Others/CCodes/OCCodeExt.m | 2 +- MeowBili/Others/LinkDetectText.swift | 2 +- MeowBili/Others/LoginView.swift | 2 +- MeowBili/Others/NoticeView.swift | 2 +- MeowBili/Others/Passthroughs.swift | 2 +- MeowBili/Others/SettingsView.swift | 2 +- MeowBili/Others/Skins/SkinChooserView.swift | 2 +- MeowBili/Others/Skins/SkinDownloadView.swift | 2 +- MeowBili/Others/Skins/SkinExplorerView.swift | 2 +- MeowBili/PersonalCenter/ArticleView.swift | 2 +- MeowBili/PersonalCenter/DownloadsView.swift | 2 +- MeowBili/PersonalCenter/FavoriteView.swift | 2 +- MeowBili/PersonalCenter/FollowListView.swift | 2 +- MeowBili/PersonalCenter/HistoryView.swift | 2 +- .../PersonalCenter/PersonAccountView.swift | 2 +- MeowBili/PersonalCenter/SelfQrCardView.swift | 2 +- MeowBili/PersonalCenter/UserDetailView.swift | 2 +- .../PersonalCenter/UserDynamicListView.swift | 2 +- MeowBili/PersonalCenter/WatchLaterView.swift | 2 +- .../bMessage/bMessageSendView.swift | 2 +- MeowBili/UserDynamic/DynamicDetailView.swift | 2 +- MeowBili/UserDynamic/DynamicSendView.swift | 2 +- MeowBili/UserDynamic/ImageViewerView.swift | 2 +- .../UserDynamic/UserDynamicMainView.swift | 2 +- MeowBili/Video/AudioPlayerView.swift | 2 +- MeowBili/Video/VideoDetailView.swift | 2 +- MeowBili/Video/VideoDownloadView.swift | 2 +- MeowBili/Video/VideoPlayerView.swift | 2 +- MeowBiliUITests/MeowBiliUITests.swift | 70 +++++ 67 files changed, 637 insertions(+), 72 deletions(-) create mode 100644 MeowBili/MeowBili.xctestplan create mode 100644 MeowBiliUITests/MeowBiliUITests.swift diff --git a/DarockBili.xcodeproj/project.pbxproj b/DarockBili.xcodeproj/project.pbxproj index c42682ef2..f8d52dd9c 100644 --- a/DarockBili.xcodeproj/project.pbxproj +++ b/DarockBili.xcodeproj/project.pbxproj @@ -310,6 +310,7 @@ 8CC5B7372B8742D300BAD89E /* ScreenshotableView in Frameworks */ = {isa = PBXBuildFile; productRef = 8CC5B7362B8742D300BAD89E /* ScreenshotableView */; }; 8CC5B7392B8742D300BAD89E /* Mixpanel in Frameworks */ = {isa = PBXBuildFile; productRef = 8CC5B7382B8742D300BAD89E /* Mixpanel */; }; 8CC5B73B2B8742D300BAD89E /* AlertToast in Frameworks */ = {isa = PBXBuildFile; productRef = 8CC5B73A2B8742D300BAD89E /* AlertToast */; }; + 8CC5B7432B8749BC00BAD89E /* MeowBiliUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC5B7422B8749BC00BAD89E /* MeowBiliUITests.swift */; }; B4DAF0DD2B80725800755F0C /* LinkDetectText.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4DAF0DB2B80725800755F0C /* LinkDetectText.swift */; }; /* End PBXBuildFile section */ @@ -321,6 +322,13 @@ remoteGlobalIDString = 8CA7CBCE2B77AC4C008E587F; remoteInfo = "MeowBili Watch App"; }; + 8CC5B7462B8749BC00BAD89E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B44689C42B4FC15A002CCEB2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8CA7CBBF2B77AC4A008E587F; + remoteInfo = MeowBili; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -414,6 +422,9 @@ 8CC5B6CC2B873E7500BAD89E /* MeowBili Mac App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MeowBili Mac App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 8CC5B6DB2B873ED400BAD89E /* MeowBili Mac App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "MeowBili Mac App.entitlements"; sourceTree = ""; }; 8CC5B6DC2B873EF600BAD89E /* MeowBili-Mac-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MeowBili-Mac-App-Info.plist"; sourceTree = ""; }; + 8CC5B7402B8749BC00BAD89E /* MeowBiliUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeowBiliUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CC5B7422B8749BC00BAD89E /* MeowBiliUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeowBiliUITests.swift; sourceTree = ""; }; + 8CC5B74B2B8749FC00BAD89E /* MeowBili.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = MeowBili.xctestplan; sourceTree = ""; }; 8CD9463A2B64CD0F005D00D0 /* Bangumi_Detail_Season.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = Bangumi_Detail_Season.json; sourceTree = ""; }; B4468A152B4FC24A002CCEB2 /* Dynamic_Feed_All.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Dynamic_Feed_All.json; sourceTree = ""; }; B4468A162B4FC24A002CCEB2 /* Search_With_UP_V2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Search_With_UP_V2.json; sourceTree = ""; }; @@ -521,6 +532,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8CC5B73D2B8749BC00BAD89E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -533,6 +551,7 @@ 8CA7CC632B77AD5B008E587F /* Info.plist */, 8CC5B6DC2B873EF600BAD89E /* MeowBili-Mac-App-Info.plist */, 8CA7CC752B77AF4B008E587F /* MeowBili-Bridging-Header.h */, + 8CC5B74B2B8749FC00BAD89E /* MeowBili.xctestplan */, 8CA7CBC22B77AC4A008E587F /* MeowBiliApp.swift */, 8CA7CC642B77AE33008E587F /* Models */, 8CA7CC6D2B77AEA4008E587F /* InMain */, @@ -727,6 +746,14 @@ path = Live; sourceTree = ""; }; + 8CC5B7412B8749BC00BAD89E /* MeowBiliUITests */ = { + isa = PBXGroup; + children = ( + 8CC5B7422B8749BC00BAD89E /* MeowBiliUITests.swift */, + ); + path = MeowBiliUITests; + sourceTree = ""; + }; B44689C32B4FC15A002CCEB2 = { isa = PBXGroup; children = ( @@ -737,6 +764,7 @@ 8CBFF1272B86188D00350E0F /* .swiftlint.yml */, B4468A142B4FC24A002CCEB2 /* JSONReturnExamples */, 8CA7CBC12B77AC4A008E587F /* MeowBili */, + 8CC5B7412B8749BC00BAD89E /* MeowBiliUITests */, B44689CB2B4FC15A002CCEB2 /* Products */, B4468A902B4FC8B7002CCEB2 /* Frameworks */, ); @@ -749,6 +777,7 @@ 8CA7CBCF2B77AC4C008E587F /* 喵哩喵哩.app */, 8CA370E82B83BB4F00CE0E9E /* MeowBili Vision App.app */, 8CC5B6CC2B873E7500BAD89E /* MeowBili Mac App.app */, + 8CC5B7402B8749BC00BAD89E /* MeowBiliUITests.xctest */, ); name = Products; sourceTree = ""; @@ -925,6 +954,24 @@ productReference = 8CC5B6CC2B873E7500BAD89E /* MeowBili Mac App.app */; productType = "com.apple.product-type.application"; }; + 8CC5B73F2B8749BC00BAD89E /* MeowBiliUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8CC5B74A2B8749BC00BAD89E /* Build configuration list for PBXNativeTarget "MeowBiliUITests" */; + buildPhases = ( + 8CC5B73C2B8749BC00BAD89E /* Sources */, + 8CC5B73D2B8749BC00BAD89E /* Frameworks */, + 8CC5B73E2B8749BC00BAD89E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8CC5B7472B8749BC00BAD89E /* PBXTargetDependency */, + ); + name = MeowBiliUITests; + productName = MeowBiliUITests; + productReference = 8CC5B7402B8749BC00BAD89E /* MeowBiliUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -948,6 +995,10 @@ 8CC5B6CB2B873E7500BAD89E = { CreatedOnToolsVersion = 15.2; }; + 8CC5B73F2B8749BC00BAD89E = { + CreatedOnToolsVersion = 15.2; + TestTargetID = 8CA7CBBF2B77AC4A008E587F; + }; }; }; buildConfigurationList = B44689C72B4FC15A002CCEB2 /* Build configuration list for PBXProject "DarockBili" */; @@ -992,6 +1043,7 @@ 8CA7CBCE2B77AC4C008E587F /* MeowBili Watch App */, 8CA370E72B83BB4F00CE0E9E /* MeowBili Vision App */, 8CC5B6CB2B873E7500BAD89E /* MeowBili Mac App */, + 8CC5B73F2B8749BC00BAD89E /* MeowBiliUITests */, ); }; /* End PBXProject section */ @@ -1038,6 +1090,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8CC5B73E2B8749BC00BAD89E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -1346,6 +1405,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8CC5B73C2B8749BC00BAD89E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CC5B7432B8749BC00BAD89E /* MeowBiliUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1354,6 +1421,11 @@ target = 8CA7CBCE2B77AC4C008E587F /* MeowBili Watch App */; targetProxy = 8CA7CBD12B77AC4C008E587F /* PBXContainerItemProxy */; }; + 8CC5B7472B8749BC00BAD89E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8CA7CBBF2B77AC4A008E587F /* MeowBili */; + targetProxy = 8CC5B7462B8749BC00BAD89E /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -1365,7 +1437,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1400,7 +1472,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1437,7 +1509,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1484,7 +1556,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1528,7 +1600,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1564,7 +1636,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1603,7 +1675,7 @@ CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_HARDENED_RUNTIME = YES; @@ -1636,7 +1708,7 @@ CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 775; + CURRENT_PROJECT_VERSION = 800; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_HARDENED_RUNTIME = YES; @@ -1661,6 +1733,53 @@ }; name = Release; }; + 8CC5B7482B8749BC00BAD89E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 800; + DEVELOPMENT_TEAM = B57D8PP775; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.darock.MeowBiliUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeowBili; + }; + name = Debug; + }; + 8CC5B7492B8749BC00BAD89E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 800; + DEVELOPMENT_TEAM = B57D8PP775; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MARKETING_VERSION = 1.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.darock.MeowBiliUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MeowBili; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; B44689DE2B4FC15B002CCEB2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1826,6 +1945,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 8CC5B74A2B8749BC00BAD89E /* Build configuration list for PBXNativeTarget "MeowBiliUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8CC5B7482B8749BC00BAD89E /* Debug */, + 8CC5B7492B8749BC00BAD89E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; B44689C72B4FC15A002CCEB2 /* Build configuration list for PBXProject "DarockBili" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/DarockBili.xcodeproj/xcshareddata/IDETemplateMacros.plist b/DarockBili.xcodeproj/xcshareddata/IDETemplateMacros.plist index 5f25e4e49..004fe8f68 100644 --- a/DarockBili.xcodeproj/xcshareddata/IDETemplateMacros.plist +++ b/DarockBili.xcodeproj/xcshareddata/IDETemplateMacros.plist @@ -14,7 +14,7 @@ // // This source file is part of the MeowBili open source project // -// Copyright (c) 2023 Darock Studio and the MeowBili project authors +// Copyright (c) 2024 Darock Studio and the MeowBili project authors // Licensed under GNU General Public License v3 // // See https://darock.top/LICENSE.txt for license information diff --git a/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme b/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme index 15112c555..b0ddc571d 100644 --- a/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme +++ b/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme @@ -73,6 +73,17 @@ ReferencedContainer = "container:DarockBili.xcodeproj"> + + + + + shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + + 1 { + for i in 1..