From 4df43d9c36ae1e4c684cf09e70a82d926bbd0e36 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Wed, 22 Mar 2023 10:58:10 -0700 Subject: [PATCH] fix minimize in dock issue for macos --- .../xcshareddata/swiftpm/Package.resolved | 11 +---------- apple/OmnivoreKit/Package.swift | 4 ++-- apple/Sources/AppDelegate.swift | 9 +++++++++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6bedd5ebd..5090a25ab 100644 --- a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -12,7 +12,7 @@ { "identity" : "analytics-swift", "kind" : "remoteSourceControl", - "location" : "https://github.com/segmentio/analytics-swift.git", + "location" : "git@github.com:segmentio/analytics-swift.git", "state" : { "revision" : "92cc824211160ab98c28c7d40c1e6d27645c2bf1", "version" : "1.2.3" @@ -153,15 +153,6 @@ "version" : "2.1.0" } }, - { - "identity" : "pspdfkit-sp", - "kind" : "remoteSourceControl", - "location" : "https://github.com/PSPDFKit/PSPDFKit-SP", - "state" : { - "revision" : "f4ba9790488b8f11c29cff35943e430efcdb8003", - "version" : "12.0.1" - } - }, { "identity" : "sovran-swift", "kind" : "remoteSourceControl", diff --git a/apple/OmnivoreKit/Package.swift b/apple/OmnivoreKit/Package.swift index 962c67a39..ef6d404d1 100644 --- a/apple/OmnivoreKit/Package.swift +++ b/apple/OmnivoreKit/Package.swift @@ -56,7 +56,7 @@ let package = Package( var appPackageDependencies: [Target.Dependency] { var deps: [Target.Dependency] = ["Views", "Services", "Models", "Utils"] // Comment out following line for macOS build - deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP")) +// deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP")) return deps } @@ -69,6 +69,6 @@ var dependencies: [Package.Dependency] { .package(url: "https://github.com/google/GoogleSignIn-iOS", from: "6.2.2") ] // Comment out following line for macOS build - deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1")) +// deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1")) return deps } diff --git a/apple/Sources/AppDelegate.swift b/apple/Sources/AppDelegate.swift index e1672654e..85210dc7f 100644 --- a/apple/Sources/AppDelegate.swift +++ b/apple/Sources/AppDelegate.swift @@ -15,12 +15,21 @@ private let logger = Logger(subsystem: "app.omnivore", category: "app-delegate") #if os(macOS) class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_: Notification) { + NSApplication.shared.delegate = self #if DEBUG if CommandLine.arguments.contains("--uitesting") { configureForUITests() } #endif } + + func applicationWillBecomeActive(_ notification: Notification) { + (notification.object as? NSApplication)?.windows.first?.makeKeyAndOrderFront(self) + } + + func applicationShouldHandleReopen(_: NSApplication, hasVisibleWindows _: Bool) -> Bool { + true + } } #elseif os(iOS)