From d5626e706b2ea0b2a6e907b4a41bf8c15bca7f1a Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Tue, 13 Aug 2024 10:25:57 -0400 Subject: [PATCH] refactor(client): delete OutlineLauncher and OutlineTunnelStore (#2114) --- .../apple/OutlineAppleLib/Package.swift | 12 - .../OutlineCatalystApp/CatalystApp.swift | 3 - .../OutlineCatalystApp/NSObject+Outline.swift | 1 - .../Sources/OutlineLauncher/AppDelegate.swift | 64 ----- .../OutlineTunnel/OutlineTunnelStore.swift | 72 ------ .../Sources/OutlineTunnel/OutlineVpn.swift | 17 -- .../OutlineTunnelTest/OutlineTunnelTest.swift | 6 - .../ios/Outline.xcodeproj/project.pbxproj | 237 ------------------ .../macos/Outline.xcodeproj/project.pbxproj | 216 ---------------- .../xcschemes/OutlineLauncher.xcscheme | 93 ------- .../xcode/macos/Outline/Classes/AppDelegate.m | 72 +----- .../macos/OutlineLauncher/AppDelegate.swift | 43 ---- .../Base.lproj/Main.storyboard | 23 -- .../xcode/macos/OutlineLauncher/Info.plist | 32 --- .../OutlineLauncher.entitlements | 14 -- 15 files changed, 10 insertions(+), 895 deletions(-) delete mode 100644 client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift delete mode 100644 client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift delete mode 100644 client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme delete mode 100644 client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift delete mode 100644 client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard delete mode 100644 client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist delete mode 100644 client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements diff --git a/client/src/cordova/apple/OutlineAppleLib/Package.swift b/client/src/cordova/apple/OutlineAppleLib/Package.swift index 76a89eba37..46950cc143 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Package.swift @@ -37,24 +37,12 @@ let package = Package( name: "OutlineTunnel", targets: ["OutlineTunnel"] ), - .library( - name: "OutlineLauncher", - targets: ["OutlineLauncher"] - ), ], dependencies: [ .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", from: "3.8.5"), .package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.26.0"), ], targets: [ - .target( - name: "OutlineLauncher", - dependencies: [ - "CocoaLumberjack", - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), - "OutlineCatalystApp", - ] - ), .target( name: "OutlineCatalystApp", dependencies: [ diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 63b7d78c8c..4e8299fa69 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -53,9 +53,6 @@ { _ in appKitController._AppKitBridge_setConnectionStatus(.disconnected) } - - // Enable app launcher to start on boot. - appKitController._AppKitBridge_setAppLauncherEnabled(true) } } diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift index 4e22efa63f..4c041c6daa 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift @@ -24,6 +24,5 @@ public enum ConnectionStatus: Int { public extension NSObject { @objc func _AppKitBridge_terminate() {} @objc func _AppKitBridge_setConnectionStatus(_: ConnectionStatus) {} - @objc func _AppKitBridge_setAppLauncherEnabled(_: Bool) {} @objc func _AppKitBridge_loadMainApp(_: String) {} } diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift deleted file mode 100644 index 067cecbec1..0000000000 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#if targetEnvironment(macCatalyst) - import CocoaLumberjack - import CocoaLumberjackSwift - import NetworkExtension - import OutlineCatalystApp - import UIKit - - @UIApplicationMain - class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - DDLog.add(DDOSLogger.sharedInstance) - - let appKitController = loadAppKitIntegrationFramework() - shouldLaunchMainApp { shouldLaunch in - defer { - DDLogInfo("Exiting launcher...") - appKitController._AppKitBridge_terminate() - } - if !shouldLaunch { - DDLogInfo("Not launching, Outline not connected at shutdown") - return - } - DDLogInfo("Outline connected at shutdown. Launching") - - guard let launcherBundleId = Bundle.main.bundleIdentifier else { - DDLogError("Failed to retrieve the bundle ID for the launcher app.") - return - } - appKitController._AppKitBridge_loadMainApp(launcherBundleId) - } - return true - } - - // Returns whether the launcher should launch the main app. - private func shouldLaunchMainApp(completion: @escaping (Bool) -> Void) { - NETunnelProviderManager.loadAllFromPreferences { managers, error in - guard error == nil, managers != nil else { - DDLogError("Failed to get tunnel manager: \(String(describing: error))") - return completion(false) - } - guard let manager: NETunnelProviderManager = managers!.first, managers!.count > 0 else { - DDLogError("No tunnel managers found.") - return completion(false) - } - DDLogInfo("Tunnel manager found.") - return completion(manager.isOnDemandEnabled) - } - } - } -#endif diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift deleted file mode 100644 index aaf3fdb0ab..0000000000 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnelStore.swift +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import Foundation - -// Persistence layer for a single |OutlineTunnel| object. -// Note that this class and its non-private properties must be public in order to be visible to the ObjC -// target of the OutlineAppleLib Swift Package. -@objcMembers -public class OutlineTunnelStore: NSObject { - // TODO(alalama): s/connection/tunnel when we update the schema. - private static let kTunnelStoreKey = "connectionStore" - private static let kTunnelStatusKey = "connectionStatus" - private static let kUdpSupportKey = "udpSupport" - - private let defaults: UserDefaults? - - // Constructs the store with UserDefaults as the storage. - public required init(appGroup: String) { - defaults = UserDefaults(suiteName: appGroup) - super.init() - } - - // Loads a previously saved tunnel from the store. - public func load() -> OutlineTunnel? { - if let encodedTunnel = defaults?.data(forKey: OutlineTunnelStore.kTunnelStoreKey) { - return OutlineTunnel.decode(encodedTunnel) - } - return nil - } - - // Writes |tunnel| to the store. - @discardableResult - public func save(_ tunnel: OutlineTunnel) -> Bool { - if let encodedTunnel = tunnel.encode() { - defaults?.set(encodedTunnel, forKey: OutlineTunnelStore.kTunnelStoreKey) - } - return true - } - - public var status: OutlineTunnel.TunnelStatus { - get { - let status = defaults?.integer(forKey: OutlineTunnelStore.kTunnelStatusKey) - ?? OutlineTunnel.TunnelStatus.disconnected.rawValue - return OutlineTunnel.TunnelStatus(rawValue:status) - ?? OutlineTunnel.TunnelStatus.disconnected - } - set(newStatus) { - defaults?.set(newStatus.rawValue, forKey: OutlineTunnelStore.kTunnelStatusKey) - } - } - - public var isUdpSupported: Bool { - get { - return defaults?.bool(forKey: OutlineTunnelStore.kUdpSupportKey) ?? false - } - set(udpSupport) { - defaults?.set(udpSupport, forKey: OutlineTunnelStore.kUdpSupportKey) - } - } -} diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift index 78a8a4ff1f..3c753ffe8a 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift @@ -152,23 +152,6 @@ public class OutlineVpn: NSObject { return ErrorCode.noError } - /** Starts the last successful VPN tunnel. */ - @objc public func startLastSuccessfulTunnel(_ completion: @escaping (Callback)) { - Task { - guard let manager = await getTunnelManager() else { - DDLogDebug("Tunnel manager not setup") - completion(ErrorCode.illegalServerConfiguration) - return - } - do { - try manager.connection.startVPNTunnel() - completion(ErrorCode.noError) - } catch { - completion(ErrorCode.vpnStartFailure) - } - } - } - /** Tears down the VPN if the tunnel with id |tunnelId| is active. */ public func stop(_ tunnelId: String) async { guard let manager = await getTunnelManager(), diff --git a/client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift b/client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift index 26208fc4d0..dd89c4fb2c 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Tests/OutlineTunnelTest/OutlineTunnelTest.swift @@ -22,12 +22,6 @@ final class OutlineTunnelTest: XCTestCase { static let kAppGroup = "outline.spm.tests" - // Example test - func testTunnelStoreDoesNotLoadBeforeSetup() throws { - let tunnelStore = OutlineTunnelStore(appGroup: OutlineTunnelTest.kAppGroup) - XCTAssertNil(tunnelStore.load()) - } - func testSelectVpnAddress() { XCTAssertEqual("10.111.222.0", selectVpnAddress(interfaceAddresses:["172.16.9.2", "192.168.20.2", "169.254.19.1"])) XCTAssertEqual("172.16.9.1", selectVpnAddress(interfaceAddresses:["10.111.222.1", "192.168.20.2", "169.254.19.1"])) diff --git a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index 95ee77c53e..650e822325 100755 --- a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -23,12 +23,9 @@ 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A25FB7DC2B0D4420009B6B5F /* AppKitIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = A272490D2B0D20530018A598 /* AppKitIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A25FB7E92B0D7631009B6B5F /* OutlineLauncher.app in Copy OutlineLauncher */ = {isa = PBXBuildFile; fileRef = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - A26F9C362B0D9CA000BCD3E6 /* OutlineLauncher in Frameworks */ = {isa = PBXBuildFile; productRef = A26F9C352B0D9CA000BCD3E6 /* OutlineLauncher */; }; A271D42D2A708240009981B2 /* AppDelegate+Outline.m in Sources */ = {isa = PBXBuildFile; fileRef = A271D42C2A708240009981B2 /* AppDelegate+Outline.m */; }; A271D4342A70829D009981B2 /* OutlineAppleLib in Frameworks */ = {isa = PBXBuildFile; productRef = A271D4332A70829D009981B2 /* OutlineAppleLib */; }; A272490F2B0D24200018A598 /* StatusItemController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2AC1A502B0821A7004E13CB /* StatusItemController.swift */; }; - A27B364F2B07C40100004A08 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A27B36512B07C51500004A08 /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = A27B36502B07C51500004A08 /* CocoaLumberjack */; }; A27B36532B07C51500004A08 /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A27B36522B07C51500004A08 /* CocoaLumberjackSwift */; }; A27F43AA29F6EC43002C3678 /* config.xml in Copy Files */ = {isa = PBXBuildFile; fileRef = F840E1F0165FE0F500CFE078 /* config.xml */; }; @@ -82,20 +79,6 @@ remoteGlobalIDString = A246B7DC2B07AACF00ECACD5; remoteInfo = AppKitIntegration; }; - A246B7FD2B07B25C00ECACD5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = A246B7DC2B07AACF00ECACD5; - remoteInfo = AppKitIntegration; - }; - A2A3EE0D2B0DB62000F8E544 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = A26D262C2A1C41B1009838E0; - remoteInfo = OutlineLauncher; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -121,28 +104,6 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - A25FB7E82B0D75CD009B6B5F /* Copy OutlineLauncher */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = Contents/Library/LoginItems; - dstSubfolderSpec = 1; - files = ( - A25FB7E92B0D7631009B6B5F /* OutlineLauncher.app in Copy OutlineLauncher */, - ); - name = "Copy OutlineLauncher"; - runOnlyForDeploymentPostprocessing = 0; - }; - A27B364E2B07C3F400004A08 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - A27B364F2B07C40100004A08 /* AppKitIntegration.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; A27F43A929F6EC1C002C3678 /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -183,8 +144,6 @@ 936C2951B7544BC8A20B6746 /* CDVClipboard.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = CDVClipboard.h; path = "cordova-plugin-clipboard/CDVClipboard.h"; sourceTree = ""; }; 941052A220F54953928FF2E2 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppKitIntegration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OutlineLauncher.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A26D26382A1C41B4009838E0 /* OutlineLauncher.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OutlineLauncher.entitlements; sourceTree = ""; }; A271D42C2A708240009981B2 /* AppDelegate+Outline.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Outline.m"; sourceTree = ""; }; A271D42E2A708253009981B2 /* AppDelegate+Outline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Outline.h"; sourceTree = ""; }; A272490D2B0D20530018A598 /* AppKitIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitIntegration.h; sourceTree = ""; }; @@ -281,14 +240,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A26D262A2A1C41B1009838E0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A26F9C362B0D9CA000BCD3E6 /* OutlineLauncher in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -312,7 +263,6 @@ isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* Outline.app */, - A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */, A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */, ); name = Products; @@ -333,7 +283,6 @@ 307C750510C5A3420062BCA9 /* Plugins */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, - A26D262E2A1C41B1009838E0 /* OutlineLauncher */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -412,14 +361,6 @@ name = Products; sourceTree = ""; }; - A26D262E2A1C41B1009838E0 /* OutlineLauncher */ = { - isa = PBXGroup; - children = ( - A26D26382A1C41B4009838E0 /* OutlineLauncher.entitlements */, - ); - path = OutlineLauncher; - sourceTree = ""; - }; A2AC1A562B082526004E13CB /* Resources */ = { isa = PBXGroup; children = ( @@ -487,7 +428,6 @@ 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, - A25FB7E82B0D75CD009B6B5F /* Copy OutlineLauncher */, 3B0347571F212F0200C8EF1F /* Embed App Extensions */, A246B7E82B07AADD00ECACD5 /* Embed Frameworks */, FC0FFD6C1FCCE21E00EB0129 /* Remove unused framework architectures */, @@ -496,7 +436,6 @@ ); dependencies = ( 5260B05E2C4F0A3300CDF289 /* PBXTargetDependency */, - A2A3EE0E2B0DB62000F8E544 /* PBXTargetDependency */, 301BF551109A68C00062928A /* PBXTargetDependency */, A246B7E72B07AADD00ECACD5 /* PBXTargetDependency */, ); @@ -530,27 +469,6 @@ productReference = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; productType = "com.apple.product-type.framework"; }; - A26D262C2A1C41B1009838E0 /* OutlineLauncher */ = { - isa = PBXNativeTarget; - buildConfigurationList = A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */; - buildPhases = ( - A25EB8812A8437D700B92EE0 /* Sources */, - A26D262A2A1C41B1009838E0 /* Frameworks */, - A27B364E2B07C3F400004A08 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - A246B7FE2B07B25C00ECACD5 /* PBXTargetDependency */, - ); - name = OutlineLauncher; - packageProductDependencies = ( - A26F9C352B0D9CA000BCD3E6 /* OutlineLauncher */, - ); - productName = OutlineLauncher; - productReference = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; - productType = "com.apple.product-type.application"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -571,10 +489,6 @@ A246B7DC2B07AACF00ECACD5 = { CreatedOnToolsVersion = 15.0.1; }; - A26D262C2A1C41B1009838E0 = { - CreatedOnToolsVersion = 14.3; - LastSwiftMigration = 1500; - }; }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Outline" */; @@ -670,7 +584,6 @@ projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* Outline */, - A26D262C2A1C41B1009838E0 /* OutlineLauncher */, A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */, ); }; @@ -764,13 +677,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A25EB8812A8437D700B92EE0 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -789,18 +695,6 @@ target = A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */; targetProxy = A246B7E62B07AADD00ECACD5 /* PBXContainerItemProxy */; }; - A246B7FE2B07B25C00ECACD5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = maccatalyst; - target = A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */; - targetProxy = A246B7FD2B07B25C00ECACD5 /* PBXContainerItemProxy */; - }; - A2A3EE0E2B0DB62000F8E544 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = maccatalyst; - target = A26D262C2A1C41B1009838E0 /* OutlineLauncher */; - targetProxy = A2A3EE0D2B0DB62000F8E544 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1098,124 +992,6 @@ }; name = Release; }; - A26D263A2A1C41B4009838E0 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OutlineLauncher/OutlineLauncher.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_HARDENED_RUNTIME = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_LSApplicationCategoryType = ""; - INFOPLIST_KEY_LSBackgroundOnly = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher3; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 6; - }; - name = Debug; - }; - A26D263B2A1C41B4009838E0 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OutlineLauncher/OutlineLauncher.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_LSApplicationCategoryType = ""; - INFOPLIST_KEY_LSBackgroundOnly = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher3; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 6; - }; - name = Release; - }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; @@ -1326,15 +1102,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A26D263A2A1C41B4009838E0 /* Debug */, - A26D263B2A1C41B4009838E0 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Outline" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1371,10 +1138,6 @@ package = 52CE53E5295B6A310064D03D /* XCRemoteSwiftPackageReference "sentry-cocoa" */; productName = Sentry; }; - A26F9C352B0D9CA000BCD3E6 /* OutlineLauncher */ = { - isa = XCSwiftPackageProductDependency; - productName = OutlineLauncher; - }; A271D4332A70829D009981B2 /* OutlineAppleLib */ = { isa = XCSwiftPackageProductDependency; productName = OutlineAppleLib; diff --git a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj index 48d78438a0..b775e440b6 100644 --- a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj +++ b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj @@ -25,10 +25,6 @@ DBBA975361C94599B9DD3891 /* CDVClipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 469466FF1BDB44C081741BF5 /* CDVClipboard.m */; }; EAD11960A27C45AFA5E46584 /* Outline-Bridging-Header.h in Resources */ = {isa = PBXBuildFile; fileRef = A508014170A1492DB0D800B3 /* Outline-Bridging-Header.h */; }; F63DC2202970B26500D92E0A /* OutlineAppleLib in Frameworks */ = {isa = PBXBuildFile; productRef = F63DC21F2970B26500D92E0A /* OutlineAppleLib */; }; - F63DC2242970B27A00D92E0A /* OutlineAppleLib in Frameworks */ = {isa = PBXBuildFile; productRef = F63DC2232970B27A00D92E0A /* OutlineAppleLib */; }; - FC0799E92037532A00A1C822 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC0799E82037532A00A1C822 /* AppDelegate.swift */; }; - FC0799F02037532A00A1C822 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC0799EE2037532A00A1C822 /* Main.storyboard */; }; - FC0799F72037543F00A1C822 /* OutlineLauncher.app in Copy OutlineLauncher */ = {isa = PBXBuildFile; fileRef = FC0799E62037532900A1C822 /* OutlineLauncher.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; FC0799F92037545D00A1C822 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC0799F82037545D00A1C822 /* ServiceManagement.framework */; }; FC5FF9501F3E1FD40032A745 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC5FF9461F3E1E8B0032A745 /* NetworkExtension.framework */; }; /* End PBXBuildFile section */ @@ -48,13 +44,6 @@ remoteGlobalIDString = 52334EAB2B0D58AD00817E56; remoteInfo = VpnExtension; }; - 5296DB072A57BBAF0009C9BB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 70BD681B18FFB02D00A1EFCF /* Project object */; - proxyType = 1; - remoteGlobalIDString = FC0799E52037532900A1C822; - remoteInfo = OutlineLauncher; - }; 70BD685F18FFB04300A1EFCF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */; @@ -72,17 +61,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - FC0799F62037541600A1C822 /* Copy OutlineLauncher */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = Contents/Library/LoginItems; - dstSubfolderSpec = 1; - files = ( - FC0799F72037543F00A1C822 /* OutlineLauncher.app in Copy OutlineLauncher */, - ); - name = "Copy OutlineLauncher"; - runOnlyForDeploymentPostprocessing = 1; - }; FC5FF9411F3E1E5F0032A745 /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -123,11 +101,6 @@ A508014170A1492DB0D800B3 /* Outline-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; path = "Outline-Bridging-Header.h"; sourceTree = ""; }; AA09EA80E0C54DFFB24A1810 /* OutlinePlugin.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = OutlinePlugin.swift; path = "cordova-plugin-outline/OutlinePlugin.swift"; sourceTree = ""; }; F63DC21E2970B23B00D92E0A /* OutlineAppleLib */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OutlineAppleLib; path = ../../src/cordova/apple/OutlineAppleLib; sourceTree = ""; }; - FC0799E62037532900A1C822 /* OutlineLauncher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OutlineLauncher.app; sourceTree = BUILT_PRODUCTS_DIR; }; - FC0799E82037532A00A1C822 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - FC0799EF2037532A00A1C822 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - FC0799F12037532A00A1C822 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FC0799F22037532A00A1C822 /* OutlineLauncher.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OutlineLauncher.entitlements; sourceTree = ""; }; FC0799F82037545D00A1C822 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; }; FC5FF9121F3E1D1B0032A745 /* Outline.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Outline.entitlements; sourceTree = ""; }; FC5FF9461F3E1E8B0032A745 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; @@ -151,14 +124,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FC0799E32037532900A1C822 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F63DC2242970B27A00D92E0A /* OutlineAppleLib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -192,7 +157,6 @@ 70BD686818FFB0BF00A1EFCF /* Classes */, 7069FBC31905A1F9000B48E1 /* Plugins */, 70D86C851B903D11000750E0 /* Resources */, - FC0799E72037532A00A1C822 /* OutlineLauncher */, 70BD682518FFB02D00A1EFCF /* Frameworks */, 70BD682418FFB02D00A1EFCF /* Products */, ); @@ -202,7 +166,6 @@ isa = PBXGroup; children = ( 70BD682318FFB02D00A1EFCF /* Outline.app */, - FC0799E62037532900A1C822 /* OutlineLauncher.app */, ); name = Products; sourceTree = ""; @@ -290,17 +253,6 @@ name = Packages; sourceTree = ""; }; - FC0799E72037532A00A1C822 /* OutlineLauncher */ = { - isa = PBXGroup; - children = ( - FC0799E82037532A00A1C822 /* AppDelegate.swift */, - FC0799EE2037532A00A1C822 /* Main.storyboard */, - FC0799F12037532A00A1C822 /* Info.plist */, - FC0799F22037532A00A1C822 /* OutlineLauncher.entitlements */, - ); - path = OutlineLauncher; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -312,7 +264,6 @@ 70BD681F18FFB02D00A1EFCF /* Sources */, 70BD682018FFB02D00A1EFCF /* Frameworks */, 70BD682118FFB02D00A1EFCF /* Resources */, - FC0799F62037541600A1C822 /* Copy OutlineLauncher */, FC5FF9411F3E1E5F0032A745 /* Embed App Extensions */, ); buildRules = ( @@ -320,7 +271,6 @@ dependencies = ( 5260B0902C4F1BBF00CDF289 /* PBXTargetDependency */, 70BD687118FFB19500A1EFCF /* PBXTargetDependency */, - 5296DB082A57BBAF0009C9BB /* PBXTargetDependency */, ); name = Outline; packageProductDependencies = ( @@ -333,26 +283,6 @@ productReference = 70BD682318FFB02D00A1EFCF /* Outline.app */; productType = "com.apple.product-type.application"; }; - FC0799E52037532900A1C822 /* OutlineLauncher */ = { - isa = PBXNativeTarget; - buildConfigurationList = FC0799F52037532A00A1C822 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */; - buildPhases = ( - FC0799E22037532900A1C822 /* Sources */, - FC0799E32037532900A1C822 /* Frameworks */, - FC0799E42037532900A1C822 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OutlineLauncher; - packageProductDependencies = ( - F63DC2232970B27A00D92E0A /* OutlineAppleLib */, - ); - productName = OutlineLauncher; - productReference = FC0799E62037532900A1C822 /* OutlineLauncher.app */; - productType = "com.apple.product-type.application"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -380,15 +310,6 @@ }; }; }; - FC0799E52037532900A1C822 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1130; - SystemCapabilities = { - com.apple.ApplicationGroups.Mac = { - enabled = 1; - }; - }; - }; }; }; buildConfigurationList = 70BD681E18FFB02D00A1EFCF /* Build configuration list for PBXProject "Outline" */; @@ -420,7 +341,6 @@ projectRoot = ""; targets = ( 70BD682218FFB02D00A1EFCF /* Outline */, - FC0799E52037532900A1C822 /* OutlineLauncher */, ); }; /* End PBXProject section */ @@ -454,14 +374,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FC0799E42037532900A1C822 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FC0799F02037532A00A1C822 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -494,14 +406,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FC0799E22037532900A1C822 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FC0799E92037532A00A1C822 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -510,11 +414,6 @@ name = VpnExtension; targetProxy = 5260B08F2C4F1BBF00CDF289 /* PBXContainerItemProxy */; }; - 5296DB082A57BBAF0009C9BB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = FC0799E52037532900A1C822 /* OutlineLauncher */; - targetProxy = 5296DB072A57BBAF0009C9BB /* PBXContainerItemProxy */; - }; 70BD687118FFB19500A1EFCF /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = CordovaLib; @@ -531,14 +430,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - FC0799EE2037532A00A1C822 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FC0799EF2037532A00A1C822 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -656,7 +547,6 @@ 70BD685518FFB02D00A1EFCF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Outline/Outline.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -692,7 +582,6 @@ 70BD685618FFB02D00A1EFCF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Outline/Outline.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -724,98 +613,6 @@ }; name = Release; }; - FC0799F32037532A00A1C822 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = OutlineLauncher/OutlineLauncher.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Outline/Plugins/cordova-plugin-outline", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = OutlineLauncher/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - FC0799F42037532A00A1C822 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = OutlineLauncher/OutlineLauncher.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Outline/Plugins/cordova-plugin-outline", - ); - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = OutlineLauncher/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -837,15 +634,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FC0799F52037532A00A1C822 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FC0799F32037532A00A1C822 /* Debug */, - FC0799F42037532A00A1C822 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -887,10 +675,6 @@ isa = XCSwiftPackageProductDependency; productName = OutlineAppleLib; }; - F63DC2232970B27A00D92E0A /* OutlineAppleLib */ = { - isa = XCSwiftPackageProductDependency; - productName = OutlineAppleLib; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 70BD681B18FFB02D00A1EFCF /* Project object */; diff --git a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme deleted file mode 100644 index 7dfca6aabd..0000000000 --- a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/xcshareddata/xcschemes/OutlineLauncher.xcscheme +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m b/client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m index cd506796fb..65f85c2283 100644 --- a/client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m +++ b/client/src/cordova/apple/xcode/macos/Outline/Classes/AppDelegate.m @@ -17,7 +17,6 @@ @import ServiceManagement; @import OutlineNotification; -@import OutlineTunnel; @import CocoaLumberjack; #ifdef DEBUG @@ -96,25 +95,16 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification { bundle:[NSBundle mainBundle]]; self.popover.contentViewController.view = self.window.contentView; - if ([self wasStartedByLauncherApp]) { - [OutlineVpn.shared startLastSuccessfulTunnel:^(enum ErrorCode errorCode) { - if (errorCode != ErrorCodeNoError) { - NSLog(@"Failed to auto-connect the VPN on startup."); - } - }]; - } else { - // The rendering of the popover is relative to the app's status item in the status bar. - // Even though we've already created the status bar above, the popover is being created - // before the status item has been rendered in the UI. This causes the initial popover - // load to be "floating" and ends up aligned at the bottom of the screen. For this initial - // load we add a small artificial delay to prevent that from happening. - double delayInSeconds = 0.5; - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - [self showPopover]; - }); - } - [self setAppLauncherEnabled:true]; // Enable app launcher to start on boot. + // The rendering of the popover is relative to the app's status item in the status bar. + // Even though we've already created the status bar above, the popover is being created + // before the status item has been rendered in the UI. This causes the initial popover + // load to be "floating" and ends up aligned at the bottom of the screen. For this initial + // load we add a small artificial delay to prevent that from happening. + double delayInSeconds = 0.5; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + [self showPopover]; + }); } - (void)applicationWillTerminate:(NSNotification *)notification { @@ -154,46 +144,4 @@ - (void)setAppIcon:(NSString *)imageName { self.statusItem.button.image.template = YES; } -#pragma mark - Launcher - -// Enables or disables the embedded app launcher as a login item. -- (void)setAppLauncherEnabled:(bool)enabled { - NSString *launcherBundleId = [self getLauncherBundleId]; - if (launcherBundleId == nil) { - return; - } - if (!SMLoginItemSetEnabled((__bridge CFStringRef) launcherBundleId, enabled)) { - return NSLog(@"Failed to %@ launcher %@", enabled ? @"enable" : @"disable", launcherBundleId); - } -} - -// Returns the embedded launcher application's bundle ID. -- (NSString *)getLauncherBundleId { - static NSString *kAppLauncherName = @"launcher"; - NSString *bundleId = NSBundle.mainBundle.bundleIdentifier; - if (bundleId == nil) { - NSLog(@"Failed to retrieve the application's bundle ID"); - return nil; - } - return [[NSString alloc] initWithFormat:@"%@.%@", bundleId, kAppLauncherName]; -} - -// Returns whether the app was started by the embedded launcher app by inspecting the launch event. -- (bool)wasStartedByLauncherApp { - NSAppleEventDescriptor *descriptor = [[NSAppleEventManager sharedAppleEventManager] - currentAppleEvent]; - if (descriptor == nil) { - return false; - } - NSAppleEventDescriptor *launcherDescriptor = [descriptor paramDescriptorForKeyword:keyAEPropData]; - if (launcherDescriptor == nil) { - return false; - } - NSString *launcherBundleId = [self getLauncherBundleId]; - if (launcherBundleId == nil) { - return false; - } - return [launcherBundleId isEqual:launcherDescriptor.stringValue]; -} - @end diff --git a/client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift b/client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift deleted file mode 100644 index 6d0d3b408b..0000000000 --- a/client/src/cordova/apple/xcode/macos/OutlineLauncher/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 The Outline Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import Cocoa -import OutlineTunnel - -@NSApplicationMain -class AppDelegate: NSObject, NSApplicationDelegate { - - static let kAppGroup = "group.org.getoutline.client" - - func applicationDidFinishLaunching(_ aNotification: Notification) { - defer { - NSApp.terminate(self) - } - let tunnelStore = OutlineTunnelStore(appGroup: AppDelegate.kAppGroup) - if tunnelStore.status != OutlineTunnel.TunnelStatus.connected { - return NSLog("Not launching, Outline not connected at shutdown") - } - // Retrieve the main app's bundle ID programmatically from the embedded launcher bundle ID. - guard let launcherBundleId = Bundle.main.bundleIdentifier else { - return NSLog("Failed to retrieve the bundle ID for the main app.") - } - let mainAppBundleId = (launcherBundleId as NSString).deletingPathExtension - NSLog("Launching app: \(mainAppBundleId) from \(launcherBundleId)") - let descriptor = NSAppleEventDescriptor(string: launcherBundleId) - NSWorkspace.shared.launchApplication(withBundleIdentifier: mainAppBundleId, - options: [.withoutActivation, .andHide], - additionalEventParamDescriptor: descriptor, - launchIdentifier: nil) - } -} diff --git a/client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard b/client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard deleted file mode 100644 index 5c7e367667..0000000000 --- a/client/src/cordova/apple/xcode/macos/OutlineLauncher/Base.lproj/Main.storyboard +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist b/client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist deleted file mode 100644 index 94019bc4e1..0000000000 --- a/client/src/cordova/apple/xcode/macos/OutlineLauncher/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSMainStoryboardFile - Main - NSPrincipalClass - NSApplication - LSBackgroundOnly - - - diff --git a/client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements b/client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements deleted file mode 100644 index 3c02119f35..0000000000 --- a/client/src/cordova/apple/xcode/macos/OutlineLauncher/OutlineLauncher.entitlements +++ /dev/null @@ -1,14 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.application-groups - - $(TeamIdentifierPrefix)org.outline.macos.client - - com.apple.security.files.user-selected.read-only - - -