diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 6a29831e..ad1dfca0 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -489,6 +489,7 @@ DBE54ABF2636C889004E7C0B /* UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB6D1B23263684C600ACB481 /* UserDefaults.swift */; }; DBE54AC62636C89F004E7C0B /* NotificationPreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBE54AC52636C89F004E7C0B /* NotificationPreference.swift */; }; DBE54ACC2636C8FD004E7C0B /* NotificationPreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBE54AC52636C89F004E7C0B /* NotificationPreference.swift */; }; + DBF7A0FC26830C33004176A2 /* FPSIndicator in Frameworks */ = {isa = PBXBuildFile; productRef = DBF7A0FB26830C33004176A2 /* FPSIndicator */; }; 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, ); }; }; DBF96326262EC0A6001D8D25 /* AuthenticationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBF96325262EC0A6001D8D25 /* AuthenticationServices.framework */; }; @@ -1133,6 +1134,7 @@ 2D5981BA25E4D7F8000FB903 /* ThirdPartyMailer in Frameworks */, 87FFDA5D898A5C42ADCB35E7 /* Pods_Mastodon.framework in Frameworks */, DB6804C82637CE2F00430867 /* AppShared.framework in Frameworks */, + DBF7A0FC26830C33004176A2 /* FPSIndicator in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2644,6 +2646,7 @@ DBAC6482267D0B21007FE9FD /* DifferenceKit */, DBAC649D267DFE43007FE9FD /* DiffableDataSources */, DBAC64A0267E6D02007FE9FD /* Fuzi */, + DBF7A0FB26830C33004176A2 /* FPSIndicator */, ); productName = Mastodon; productReference = DB427DD225BAA00100D1B89D /* Mastodon.app */; @@ -2835,6 +2838,7 @@ DBAC6481267D0B21007FE9FD /* XCRemoteSwiftPackageReference "DifferenceKit" */, DBAC649C267DFE43007FE9FD /* XCRemoteSwiftPackageReference "DiffableDataSources" */, DBAC649F267E6D01007FE9FD /* XCRemoteSwiftPackageReference "Fuzi" */, + DBF7A0FA26830C33004176A2 /* XCRemoteSwiftPackageReference "FPSIndicator" */, ); productRefGroup = DB427DD325BAA00100D1B89D /* Products */; projectDirPath = ""; @@ -4798,6 +4802,14 @@ minimumVersion = 2.11.0; }; }; + DBF7A0FA26830C33004176A2 /* XCRemoteSwiftPackageReference "FPSIndicator" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/MainasuK/FPSIndicator.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -4890,6 +4902,11 @@ package = DBB525062611EAC0002F1F29 /* XCRemoteSwiftPackageReference "Tabman" */; productName = Tabman; }; + DBF7A0FB26830C33004176A2 /* FPSIndicator */ = { + isa = XCSwiftPackageProductDependency; + package = DBF7A0FA26830C33004176A2 /* XCRemoteSwiftPackageReference "FPSIndicator" */; + productName = FPSIndicator; + }; /* 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 ffae1ea2..70bbb246 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 - 21 + 30 Mastodon - ASDK.xcscheme_^#shared#^_ @@ -37,7 +37,7 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 22 + 27 SuppressBuildableAutocreation diff --git a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved index 44a63faa..e82cf3c0 100644 --- a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -64,6 +64,15 @@ "version": "1.2.0" } }, + { + "package": "FPSIndicator", + "repositoryURL": "https://github.com/MainasuK/FPSIndicator.git", + "state": { + "branch": null, + "revision": "b2a002d689c400485f2ba41f9e71e15f7b99764a", + "version": "1.0.1" + } + }, { "package": "Fuzi", "repositoryURL": "https://github.com/cezheng/Fuzi.git", diff --git a/Mastodon/Scene/MainTab/MainTabBarController.swift b/Mastodon/Scene/MainTab/MainTabBarController.swift index 50c3d0b6..f0ee0a7f 100644 --- a/Mastodon/Scene/MainTab/MainTabBarController.swift +++ b/Mastodon/Scene/MainTab/MainTabBarController.swift @@ -10,10 +10,6 @@ import UIKit import Combine import SafariServices -#if DEBUG -import GDPerformanceView_Swift -#endif - class MainTabBarController: UITabBarController { var disposeBag = Set() @@ -189,15 +185,7 @@ extension MainTabBarController { } .store(in: &disposeBag) } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - - #if DEBUG - PerformanceMonitor.shared().start() - #endif - } - + } extension MainTabBarController { diff --git a/Mastodon/Supporting Files/AppDelegate.swift b/Mastodon/Supporting Files/AppDelegate.swift index c92b077c..4b219380 100644 --- a/Mastodon/Supporting Files/AppDelegate.swift +++ b/Mastodon/Supporting Files/AppDelegate.swift @@ -10,10 +10,6 @@ import UIKit import UserNotifications import AppShared -#if DEBUG -import GDPerformanceView_Swift -#endif - #if ASDK import AsyncDisplayKit #endif diff --git a/Mastodon/Supporting Files/SceneDelegate.swift b/Mastodon/Supporting Files/SceneDelegate.swift index 948911a2..7c961dbd 100644 --- a/Mastodon/Supporting Files/SceneDelegate.swift +++ b/Mastodon/Supporting Files/SceneDelegate.swift @@ -9,6 +9,10 @@ import UIKit import Combine import CoreDataStack +#if DEBUG +import FPSIndicator +#endif + class SceneDelegate: UIResponder, UIWindowSceneDelegate { var observations = Set() @@ -16,6 +20,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? var coordinator: SceneCoordinator? + #if DEBUG + var fpsIndicator: FPSIndicator? + #endif + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = scene as? UIWindowScene else { return } @@ -38,6 +47,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { self.window?.overrideUserInterfaceStyle = defaults.customUserInterfaceStyle } .store(in: &observations) + + #if DEBUG + fpsIndicator = FPSIndicator(windowScene: windowScene) + #endif } func sceneDidDisconnect(_ scene: UIScene) { diff --git a/Podfile b/Podfile index 1039ff0f..ecfb510b 100644 --- a/Podfile +++ b/Podfile @@ -17,7 +17,6 @@ target 'Mastodon' do # DEBUG pod 'FLEX', '~> 4.4.0', :configurations => ['Debug', 'ASDK - Debug'] - pod 'GDPerformanceView-Swift', '~> 2.1.1', :configurations => ['Debug', 'ASDK - Debug'] target 'MastodonTests' do inherit! :search_paths diff --git a/Podfile.lock b/Podfile.lock index ff92fb24..079d0080 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,7 +1,6 @@ PODS: - DateToolsSwift (5.0.0) - FLEX (4.4.1) - - GDPerformanceView-Swift (2.1.1) - Kanna (5.2.4) - Keys (1.0.1) - PINCache (3.0.3): @@ -45,7 +44,6 @@ PODS: DEPENDENCIES: - DateToolsSwift (~> 5.0.0) - FLEX (~> 4.4.0) - - GDPerformanceView-Swift (~> 2.1.1) - Kanna (~> 5.2.2) - Keys (from `Pods/CocoaPodsKeys`) - SwiftGen (~> 6.4.0) @@ -56,7 +54,6 @@ SPEC REPOS: trunk: - DateToolsSwift - FLEX - - GDPerformanceView-Swift - Kanna - PINCache - PINOperation @@ -72,7 +69,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: DateToolsSwift: 4207ada6ad615d8dc076323d27037c94916dbfa6 FLEX: 7ca2c8cd3a435ff501ff6d2f2141e9bdc934eaab - GDPerformanceView-Swift: 22d964fe40b19e3d914dba2586237d064de8fd77 Kanna: b9d00d7c11428308c7f95e1f1f84b8205f567a8f Keys: a576f4c9c1c641ca913a959a9c62ed3f215a8de9 PINCache: 7a8fc1a691173d21dbddbf86cd515de6efa55086 @@ -82,6 +78,6 @@ SPEC CHECKSUMS: Texture: 2f109e937850d94d1d07232041c9c7313ccddb81 "UITextField+Shake": 298ac5a0f239d731bdab999b19b628c956ca0ac3 -PODFILE CHECKSUM: a0d0a385a2888802244e7841940a7d5a55315e1f +PODFILE CHECKSUM: f2f99b5771c5c36ef69d13999b88cea5b0e8bfe1 COCOAPODS: 1.10.1