From 84bf7f7959b994c968a47a530f6ca1210041cfc7 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Fri, 20 Oct 2023 11:35:10 +0200 Subject: [PATCH 01/19] Synchronize macos versions and fix code signing identity. --- .../apple/xcode/ios/Outline.xcodeproj/project.pbxproj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index c4d27dcb8c..eb10302f47 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -1017,6 +1017,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -1082,7 +1083,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 13.3; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SKIP_INSTALL = NO; @@ -1125,7 +1126,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 13.3; SDKROOT = iphoneos; SKIP_INSTALL = NO; SWIFT_COMPILATION_MODE = wholemodule; From c8481daa22f43cbd36b59cd51f09b14250f7fe26 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Mon, 23 Oct 2023 14:02:54 -0400 Subject: [PATCH 02/19] Add `OutlineNotification` as explicit target dependency. --- src/cordova/apple/OutlineAppleLib/Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index fbb04078cb..5a2e844126 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -41,6 +41,7 @@ let package = Package( dependencies: [ "OutlineAppKitBridge", .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), + "OutlineNotification", ] ), .target( From 276211b17dfce428a2433c650dfdcdfc5c43d323 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Mon, 23 Oct 2023 14:35:05 -0400 Subject: [PATCH 03/19] Format `Package.swift`. --- .../apple/OutlineAppleLib/Package.swift | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 5a2e844126..3e04ae5f79 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -31,10 +31,11 @@ let package = Package( targets: [ .target( name: "OutlineLauncher", - dependencies: - ["CocoaLumberjack", - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), - "OutlineCatalystApp"] + dependencies: [ + "CocoaLumberjack", + .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), + "OutlineCatalystApp", + ] ), .target( name: "OutlineCatalystApp", @@ -53,11 +54,12 @@ let package = Package( ), .target( name: "PacketTunnelProvider", - dependencies: - ["CocoaLumberjack", - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), - "Tun2socks", - "OutlineTunnel"], + dependencies: [ + "CocoaLumberjack", + .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), + "Tun2socks", + "OutlineTunnel", + ], cSettings: [ .headerSearchPath("Internal"), ] From 605a7ca542dd4b6c69ded0260237b17cffe7321e Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 19:38:36 -0500 Subject: [PATCH 04/19] Set principal class on `Info.plist`. --- src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index eb10302f47..9539894325 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -985,7 +985,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - INFOPLIST_KEY_NSPrincipalClass = ""; + INFOPLIST_KEY_NSPrincipalClass = "$(PRODUCT_MODULE_NAME).AppKitBridge"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; @@ -1030,7 +1030,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - INFOPLIST_KEY_NSPrincipalClass = ""; + INFOPLIST_KEY_NSPrincipalClass = "$(PRODUCT_MODULE_NAME).AppKitBridge"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; From 10113663e14d22894635fbfb28c9abe25caa440a Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 20:26:10 -0500 Subject: [PATCH 05/19] Combine guard statements. --- .../OutlineCatalystApp/AppKitBundleLoader.swift | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift index a98024d9e9..425dc914e6 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift @@ -22,16 +22,11 @@ enum BridgeBundle { } public func createAppKitBridge() -> AppKitBridgeProtocol { - guard let bundleURL = Bundle.main.builtInPlugInsURL?.appendingPathComponent(BridgeBundle.fileName) else { - preconditionFailure("[AppKitBundleLoader] \(BridgeBundle.fileName) should exist") - } - guard let bundle = Bundle(url: bundleURL) else { - preconditionFailure("[AppKitBundleLoader] \(BridgeBundle.fileName) should exist") + guard let bundleURL = Bundle.main.builtInPlugInsURL?.appendingPathComponent(BridgeBundle.fileName), + let bundle = Bundle(url: bundleURL), + let bridgeClass = bundle.classNamed(BridgeBundle.className) as? AppKitBridgeProtocol.Type else { + preconditionFailure("[AppKitBundleLoader] Failed to load AppKit bundle") } DDLogInfo("[AppKitBundleLoader] AppKit bundle loaded successfully") - let className = BridgeBundle.className - guard let appKitBridgeClass = bundle.classNamed(className) as? AppKitBridgeProtocol.Type else { - preconditionFailure("[AppKitBundleLoader] Cannot initialise \(className) from \(BridgeBundle.fileName)") - } - return appKitBridgeClass.init() + return bridgeClass.init() } From b2ab8fb5ae1dce6b990fbef22ca7e04c4c277887 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 20:34:38 -0500 Subject: [PATCH 06/19] Remove CocoaLumberjack from AppKitBridge bundle. --- src/cordova/apple/OutlineAppleLib/Package.swift | 1 - .../Sources/OutlineAppKitBridge/AppKitBridge.swift | 13 ++++++------- .../OutlineAppKitBridge/StatusItemController.swift | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 3e04ae5f79..40b3a8f376 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -48,7 +48,6 @@ let package = Package( .target( name: "OutlineAppKitBridge", dependencies: [ - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), "OutlineNotification", ] ), diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift index 9067e14b04..961e930633 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift @@ -14,7 +14,6 @@ #if os(macOS) import AppKit - import CocoaLumberjackSwift import ServiceManagement public class AppKitBridge: NSObject, AppKitBridgeProtocol { @@ -34,7 +33,7 @@ /// Set the connection status in the app's menu in the system-wide menu bar. @objc public func setConnectionStatus(_ status: ConnectionStatus) { if statusItemController == nil { - DDLogInfo("[AppKitBridge] No status item controller found. Creating one now.") + NSLog("[AppKitBridge] No status item controller found. Creating one now.") statusItemController = StatusItemController() } statusItemController!.setStatus(status: status) @@ -43,21 +42,21 @@ /// Enables or disables the embedded app launcher as a login item. @objc public func setAppLauncherEnabled(_ isEnabled: Bool) { guard let launcherBundleId = getLauncherBundleId() else { - return DDLogError("[AppKitBridge] Unable to set launcher for missing bundle ID.") + return NSLog("[AppKitBridge] Unable to set launcher for missing bundle ID.") } if !SMLoginItemSetEnabled(launcherBundleId as! CFString, isEnabled) { - return DDLogError("[AppKitBridge] Failed to set enable=\(isEnabled) for launcher \(launcherBundleId).") + return NSLog("[AppKitBridge] Failed to set enable=\(isEnabled) for launcher \(launcherBundleId).") } - return DDLogInfo("[AppKitBridge] Successfully set enable=\(isEnabled) for launcher \(launcherBundleId).") + return NSLog("[AppKitBridge] Successfully set enable=\(isEnabled) for launcher \(launcherBundleId).") } /// Loads the main application from a given launcher bundle. @objc public func loadMainApp(_ launcherBundleId: String) { // Retrieve the main app's bundle ID programmatically from the embedded launcher bundle ID. let mainAppBundleId = getMainBundleId(launcherBundleId) - DDLogInfo("[AppKitBridge] Loading main app \(mainAppBundleId) from launcher \(launcherBundleId).") + NSLog("[AppKitBridge] Loading main app \(mainAppBundleId) from launcher \(launcherBundleId).") let descriptor = NSAppleEventDescriptor(string: launcherBundleId) NSWorkspace.shared.launchApplication(withBundleIdentifier: mainAppBundleId, @@ -70,7 +69,7 @@ /// Returns the embedded launcher application's bundle ID. private func getLauncherBundleId() -> String? { guard let bundleId = Bundle.main.bundleIdentifier else { - DDLogError("[AppKitBridge] Failed to retrieve the application's bundle ID.") + NSLog("[AppKitBridge] Failed to retrieve the application's bundle ID.") return nil } return String(format: "%@.%@", bundleId, AppKitBridge.kAppLauncherName) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift index e053c3f3c7..2c60183680 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift @@ -14,7 +14,6 @@ #if os(macOS) import AppKit - import CocoaLumberjackSwift import OutlineNotification var StatusItem = NSStatusItem() @@ -51,7 +50,7 @@ override init() { super.init() - DDLogInfo("[StatusItemController] Creating status menu") + NSLog("[StatusItemController] Creating status menu") StatusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) setStatus(status: .disconnected) @@ -78,7 +77,7 @@ } @objc func openApplication(_: AnyObject?) { - DDLogInfo("[StatusItemController] Opening application") + NSLog("[StatusItemController] Opening application") NSApp.activate(ignoringOtherApps: true) guard let uiWindow = getUiWindow() else { return @@ -87,7 +86,7 @@ } @objc func closeApplication(_: AnyObject?) { - DDLogInfo("[StatusItemController] Closing application") + NSLog("[StatusItemController] Closing application") NotificationCenter.default.post(name: .kAppQuit, object: nil) NSApplication.shared.terminate(self) } From 6c9a9d18b1f1bc6d48bb201d45a26bbb334df136 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 20:39:37 -0500 Subject: [PATCH 07/19] Remove OutlineNotification from AppKitBridge bundle. --- src/cordova/apple/OutlineAppleLib/Package.swift | 7 +------ .../Sources/OutlineAppKitBridge/StatusItemController.swift | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 40b3a8f376..2226c106be 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -45,12 +45,7 @@ let package = Package( "OutlineNotification", ] ), - .target( - name: "OutlineAppKitBridge", - dependencies: [ - "OutlineNotification", - ] - ), + .target(name: "OutlineAppKitBridge"), .target( name: "PacketTunnelProvider", dependencies: [ diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift index 2c60183680..4f5c457a8b 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift @@ -14,7 +14,6 @@ #if os(macOS) import AppKit - import OutlineNotification var StatusItem = NSStatusItem() @@ -87,7 +86,7 @@ @objc func closeApplication(_: AnyObject?) { NSLog("[StatusItemController] Closing application") - NotificationCenter.default.post(name: .kAppQuit, object: nil) + NotificationCenter.default.post(name: Notification.Name("appQuit"), object: nil) NSApplication.shared.terminate(self) } } From 0da1fad974cad172ded488a6bab469d692c7d3a8 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 20:53:14 -0500 Subject: [PATCH 08/19] Remove type annotation. --- .../Sources/OutlineCatalystApp/OutlineCatalystApp.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift index a9624eb190..555a8054e9 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift @@ -16,7 +16,6 @@ import CocoaLumberjack import CocoaLumberjackSwift import Foundation - import OutlineAppKitBridge import OutlineNotification import ServiceManagement @@ -25,7 +24,7 @@ public static func initApp() { DDLog.add(DDOSLogger.sharedInstance) - let appKitBridge: AppKitBridgeProtocol = createAppKitBridge() + let appKitBridge = createAppKitBridge() // Configure the window. let scenes = UIApplication.shared.connectedScenes From 87cd5af617b96bae351fc8fe9318634ad72321ff Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 14 Nov 2023 21:05:51 -0500 Subject: [PATCH 09/19] Move protocol to its own target. --- src/cordova/apple/OutlineAppleLib/Package.swift | 10 ++++++++-- .../Sources/OutlineAppKitBridge/AppKitBridge.swift | 1 + .../OutlineAppKitBridge/StatusItemController.swift | 1 + .../AppKitBridgeProtocol.swift | 0 .../ConnectionStatus.swift | 0 .../OutlineCatalystApp/AppKitBundleLoader.swift | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) rename src/cordova/apple/OutlineAppleLib/Sources/{OutlineAppKitBridge => OutlineAppKitBridgeProtocol}/AppKitBridgeProtocol.swift (100%) rename src/cordova/apple/OutlineAppleLib/Sources/{OutlineAppKitBridge => OutlineAppKitBridgeProtocol}/ConnectionStatus.swift (100%) diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 2226c106be..33568bc832 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -40,12 +40,18 @@ let package = Package( .target( name: "OutlineCatalystApp", dependencies: [ - "OutlineAppKitBridge", + "OutlineAppKitBridgeProtocol", .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), "OutlineNotification", ] ), - .target(name: "OutlineAppKitBridge"), + .target(name: "OutlineAppKitBridgeProtocol"), + .target( + name: "OutlineAppKitBridge", + dependencies: [ + "OutlineAppKitBridgeProtocol" + ] + ), .target( name: "PacketTunnelProvider", dependencies: [ diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift index 961e930633..40b190d5aa 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift @@ -14,6 +14,7 @@ #if os(macOS) import AppKit + import OutlineAppKitBridgeProtocol import ServiceManagement public class AppKitBridge: NSObject, AppKitBridgeProtocol { diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift index 4f5c457a8b..5fe685fac5 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift @@ -14,6 +14,7 @@ #if os(macOS) import AppKit + import OutlineAppKitBridgeProtocol var StatusItem = NSStatusItem() diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridgeProtocol.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridgeProtocol.swift rename to src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/ConnectionStatus.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/ConnectionStatus.swift rename to src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift index 425dc914e6..4b811aec8c 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift @@ -14,7 +14,7 @@ import CocoaLumberjackSwift import Foundation -import OutlineAppKitBridge +import OutlineAppKitBridgeProtocol enum BridgeBundle { static let fileName = "AppKitBridge.bundle" From 83edbc50f92ca705e4b360182b515649515a3edd Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 13:51:13 -0500 Subject: [PATCH 10/19] use framework. works without launcher. --- package-lock.json | 86 ++- package.json | 4 +- .../apple/OutlineAppleLib/Package.swift | 33 +- .../OutlineAppKitBridge/AppKitBridge.swift | 83 --- .../StatusItemController.swift | 111 --- .../AppKitBridgeProtocol.swift | 28 - .../AppKitBundleLoader.swift | 32 - .../Sources/OutlineLauncher/AppDelegate.swift | 64 -- .../xcode/ios/Launcher/AppDelegate.swift | 87 +++ .../ios/Outline.xcodeproj/project.pbxproj | 677 ++++++++++++++---- .../xcshareddata/xcschemes/Outline.xcscheme | 10 +- .../ios/Outline/Classes/AppDelegate+Outline.m | 1 - .../AppKitBridge/AppKitController.swift | 81 +++ .../Classes/AppKitBridge/AppKitIntegration.h} | 12 +- .../Resources/Assets.xcassets/Contents.json | 0 .../Contents.json | 0 .../outline-black-off-2x.png | Bin .../Contents.json | 0 .../outline-black-on-2x.png | Bin .../Strings/af.lproj/Localizable.strings | 0 .../Strings/am.lproj/Localizable.strings | 0 .../Strings/ar.lproj/Localizable.strings | 0 .../Strings/az.lproj/Localizable.strings | 0 .../Strings/bg.lproj/Localizable.strings | 0 .../Strings/bn.lproj/Localizable.strings | 0 .../Strings/bs.lproj/Localizable.strings | 0 .../Strings/ca.lproj/Localizable.strings | 0 .../Strings/cs.lproj/Localizable.strings | 0 .../Strings/da.lproj/Localizable.strings | 0 .../Strings/de.lproj/Localizable.strings | 0 .../Strings/el.lproj/Localizable.strings | 0 .../Strings/en-GB.lproj/Localizable.strings | 0 .../Strings/en.lproj/Localizable.strings | 0 .../Strings/es-419.lproj/Localizable.strings | 0 .../Strings/es.lproj/Localizable.strings | 0 .../Strings/et.lproj/Localizable.strings | 0 .../Strings/fa.lproj/Localizable.strings | 0 .../Strings/fi.lproj/Localizable.strings | 0 .../Strings/fil.lproj/Localizable.strings | 0 .../Strings/fr.lproj/Localizable.strings | 0 .../Strings/he.lproj/Localizable.strings | 0 .../Strings/hi.lproj/Localizable.strings | 0 .../Strings/hr.lproj/Localizable.strings | 0 .../Strings/hu.lproj/Localizable.strings | 0 .../Strings/hy.lproj/Localizable.strings | 0 .../Strings/id.lproj/Localizable.strings | 0 .../Strings/is.lproj/Localizable.strings | 0 .../Strings/it.lproj/Localizable.strings | 0 .../Strings/ja.lproj/Localizable.strings | 0 .../Strings/ka.lproj/Localizable.strings | 0 .../Strings/kk.lproj/Localizable.strings | 0 .../Strings/km.lproj/Localizable.strings | 0 .../Strings/ko.lproj/Localizable.strings | 0 .../Strings/lo.lproj/Localizable.strings | 0 .../Strings/lt.lproj/Localizable.strings | 0 .../Strings/lv.lproj/Localizable.strings | 0 .../Strings/mk.lproj/Localizable.strings | 0 .../Strings/mn.lproj/Localizable.strings | 0 .../Strings/mr.lproj/Localizable.strings | 0 .../Strings/ms.lproj/Localizable.strings | 0 .../Strings/my.lproj/Localizable.strings | 0 .../Strings/ne.lproj/Localizable.strings | 0 .../Strings/nl.lproj/Localizable.strings | 0 .../Strings/no.lproj/Localizable.strings | 0 .../Strings/pl.lproj/Localizable.strings | 0 .../Strings/pt-BR.lproj/Localizable.strings | 0 .../Strings/pt-PT.lproj/Localizable.strings | 0 .../Strings/ro.lproj/Localizable.strings | 0 .../Strings/ru.lproj/Localizable.strings | 0 .../Strings/si.lproj/Localizable.strings | 0 .../Strings/sk.lproj/Localizable.strings | 0 .../Strings/sl.lproj/Localizable.strings | 0 .../Strings/sq.lproj/Localizable.strings | 0 .../Strings/sr-Latn.lproj/Localizable.strings | 0 .../Strings/sr.lproj/Localizable.strings | 0 .../Strings/sv.lproj/Localizable.strings | 0 .../Strings/sw.lproj/Localizable.strings | 0 .../Strings/ta.lproj/Localizable.strings | 0 .../Strings/th.lproj/Localizable.strings | 0 .../Strings/tr.lproj/Localizable.strings | 0 .../Strings/uk.lproj/Localizable.strings | 0 .../Strings/ur.lproj/Localizable.strings | 0 .../Strings/vi.lproj/Localizable.strings | 0 .../Strings/zh-Hans.lproj/Localizable.strings | 0 .../Strings/zh-Hant.lproj/Localizable.strings | 0 .../AppKitBridge/StatusItemController.swift | 115 +++ .../Classes/CatalystApp/CatalystApp.swift} | 47 +- 87 files changed, 917 insertions(+), 554 deletions(-) delete mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift delete mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift delete mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift delete mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift delete mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift create mode 100644 src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift create mode 100644 src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift => xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h} (69%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Assets.xcassets/Contents.json (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/af.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/am.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ar.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/az.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/bg.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/bn.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/bs.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ca.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/cs.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/da.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/de.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/el.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/en-GB.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/en.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/es-419.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/es.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/et.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/fa.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/fi.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/fil.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/fr.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/he.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/hi.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/hr.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/hu.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/hy.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/id.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/is.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/it.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ja.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ka.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/kk.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/km.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ko.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/lo.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/lt.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/lv.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/mk.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/mn.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/mr.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ms.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/my.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ne.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/nl.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/no.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/pl.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/pt-BR.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/pt-PT.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ro.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ru.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/si.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sk.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sl.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sq.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sr-Latn.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sr.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sv.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/sw.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ta.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/th.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/tr.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/uk.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/ur.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/vi.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/zh-Hans.lproj/Localizable.strings (100%) rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineAppKitBridge => xcode/ios/Outline/Classes/AppKitBridge}/Resources/Strings/zh-Hant.lproj/Localizable.strings (100%) create mode 100644 src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift rename src/cordova/apple/{OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift => xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift} (58%) diff --git a/package-lock.json b/package-lock.json index cb6e20252c..6de24642be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10164,9 +10164,9 @@ } }, "node_modules/cordova-ios/node_modules/nopt": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.1.0.tgz", - "integrity": "sha512-ZFPLe9Iu0tnx7oWhFxAo4s7QTn8+NNDDxYNaKLjE7Dp0tbakQ3M1QhQzsnzXHQBTUO3K9BmwaxnyO8Ayn2I95Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", "dev": true, "dependencies": { "abbrev": "^2.0.0" @@ -10179,9 +10179,9 @@ } }, "node_modules/cordova-ios/node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -10194,9 +10194,9 @@ } }, "node_modules/cordova-ios/node_modules/which": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", - "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, "dependencies": { "isexe": "^2.0.0" @@ -15310,8 +15310,9 @@ }, "node_modules/ios-sim": { "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", + "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", "dev": true, - "license": "MIT", "dependencies": { "bplist-parser": "^0.0.6", "nopt": "1.0.9", @@ -15327,18 +15328,23 @@ }, "node_modules/ios-sim/node_modules/bplist-parser": { "version": "0.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==", + "dev": true }, "node_modules/ios-sim/node_modules/nopt": { "version": "1.0.9", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==", "dev": true, - "license": "MIT", "dependencies": { "abbrev": "1" }, "bin": { "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" } }, "node_modules/ip": { @@ -22807,8 +22813,9 @@ }, "node_modules/simctl": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", + "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", "dev": true, - "license": "MIT", "dependencies": { "shelljs": "^0.8.5", "tail": "^0.4.0" @@ -22816,14 +22823,17 @@ }, "node_modules/simctl/node_modules/interpret": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/simctl/node_modules/rechoir": { "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { "resolve": "^1.1.6" @@ -22834,8 +22844,9 @@ }, "node_modules/simctl/node_modules/shelljs": { "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -23791,6 +23802,8 @@ }, "node_modules/tail": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==", "dev": true, "engines": { "node": ">= 0.4.0" @@ -25980,8 +25993,9 @@ }, "node_modules/xml-escape": { "version": "1.1.0", - "dev": true, - "license": "MIT License" + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==", + "dev": true }, "node_modules/xml-parse-from-string": { "version": "1.0.1", @@ -33879,27 +33893,27 @@ } }, "nopt": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.1.0.tgz", - "integrity": "sha512-ZFPLe9Iu0tnx7oWhFxAo4s7QTn8+NNDDxYNaKLjE7Dp0tbakQ3M1QhQzsnzXHQBTUO3K9BmwaxnyO8Ayn2I95Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", "dev": true, "requires": { "abbrev": "^2.0.0" } }, "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, "which": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", - "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -37421,6 +37435,8 @@ }, "ios-sim": { "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", + "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", "dev": true, "requires": { "bplist-parser": "^0.0.6", @@ -37431,10 +37447,14 @@ "dependencies": { "bplist-parser": { "version": "0.0.6", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==", "dev": true }, "nopt": { "version": "1.0.9", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==", "dev": true, "requires": { "abbrev": "1" @@ -42690,6 +42710,8 @@ }, "simctl": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", + "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", "dev": true, "requires": { "shelljs": "^0.8.5", @@ -42698,10 +42720,14 @@ "dependencies": { "interpret": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "rechoir": { "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "requires": { "resolve": "^1.1.6" @@ -42709,6 +42735,8 @@ }, "shelljs": { "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, "requires": { "glob": "^7.0.0", @@ -43405,6 +43433,8 @@ }, "tail": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==", "dev": true }, "tapable": { @@ -44873,6 +44903,8 @@ }, "xml-escape": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==", "dev": true }, "xml-parse-from-string": { diff --git a/package.json b/package.json index 7f4373057b..5835765947 100644 --- a/package.json +++ b/package.json @@ -163,8 +163,8 @@ "platforms": [ "browser", "android", - "ios", - "osx" + "osx", + "ios" ] }, "workspaces": [ diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 33568bc832..892255cfdd 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -9,15 +9,7 @@ let package = Package( products: [ .library( name: "OutlineAppleLib", - targets: ["Tun2socks", "OutlineSentryLogger", "OutlineTunnel", "OutlineCatalystApp", "OutlineNotification"] - ), - .library( - name: "OutlineLauncher", - targets: ["OutlineLauncher"] - ), - .library( - name: "OutlineAppKitBridge", - targets: ["OutlineAppKitBridge"] + targets: ["Tun2socks", "OutlineSentryLogger", "OutlineTunnel", "OutlineNotification"] ), .library( name: "PacketTunnelProvider", @@ -29,29 +21,6 @@ let package = Package( .package(url: "https://github.com/getsentry/sentry-cocoa", from: "7.31.3"), ], targets: [ - .target( - name: "OutlineLauncher", - dependencies: [ - "CocoaLumberjack", - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), - "OutlineCatalystApp", - ] - ), - .target( - name: "OutlineCatalystApp", - dependencies: [ - "OutlineAppKitBridgeProtocol", - .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), - "OutlineNotification", - ] - ), - .target(name: "OutlineAppKitBridgeProtocol"), - .target( - name: "OutlineAppKitBridge", - dependencies: [ - "OutlineAppKitBridgeProtocol" - ] - ), .target( name: "PacketTunnelProvider", dependencies: [ diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift deleted file mode 100644 index 40b190d5aa..0000000000 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/AppKitBridge.swift +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2023 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 os(macOS) - import AppKit - import OutlineAppKitBridgeProtocol - import ServiceManagement - - public class AppKitBridge: NSObject, AppKitBridgeProtocol { - private var statusItemController: StatusItemController? - static let kAppGroup = "QT8Z3Q9V3A.org.outline.macos.client" - static let kAppLauncherName = "launcher3" - - override public required init() { - super.init() - } - - /// Terminates the application. - @objc public func terminate() { - NSApp.terminate(self) - } - - /// Set the connection status in the app's menu in the system-wide menu bar. - @objc public func setConnectionStatus(_ status: ConnectionStatus) { - if statusItemController == nil { - NSLog("[AppKitBridge] No status item controller found. Creating one now.") - statusItemController = StatusItemController() - } - statusItemController!.setStatus(status: status) - } - - /// Enables or disables the embedded app launcher as a login item. - @objc public func setAppLauncherEnabled(_ isEnabled: Bool) { - guard let launcherBundleId = getLauncherBundleId() else { - return NSLog("[AppKitBridge] Unable to set launcher for missing bundle ID.") - } - - if !SMLoginItemSetEnabled(launcherBundleId as! CFString, isEnabled) { - return NSLog("[AppKitBridge] Failed to set enable=\(isEnabled) for launcher \(launcherBundleId).") - } - - return NSLog("[AppKitBridge] Successfully set enable=\(isEnabled) for launcher \(launcherBundleId).") - } - - /// Loads the main application from a given launcher bundle. - @objc public func loadMainApp(_ launcherBundleId: String) { - // Retrieve the main app's bundle ID programmatically from the embedded launcher bundle ID. - let mainAppBundleId = getMainBundleId(launcherBundleId) - NSLog("[AppKitBridge] Loading main app \(mainAppBundleId) from launcher \(launcherBundleId).") - - let descriptor = NSAppleEventDescriptor(string: launcherBundleId) - NSWorkspace.shared.launchApplication(withBundleIdentifier: mainAppBundleId, - options: [.withoutActivation, .andHide], - additionalEventParamDescriptor: descriptor, - launchIdentifier: nil) - } - } - - /// Returns the embedded launcher application's bundle ID. - private func getLauncherBundleId() -> String? { - guard let bundleId = Bundle.main.bundleIdentifier else { - NSLog("[AppKitBridge] Failed to retrieve the application's bundle ID.") - return nil - } - return String(format: "%@.%@", bundleId, AppKitBridge.kAppLauncherName) - } - - /// Returns the main application's bundle ID from the embedded launcher bundle ID. - private func getMainBundleId(_ launcherBundleId: String) -> String { - return (launcherBundleId as NSString).deletingPathExtension - } -#endif diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift deleted file mode 100644 index 5fe685fac5..0000000000 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/StatusItemController.swift +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2023 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 os(macOS) - import AppKit - import OutlineAppKitBridgeProtocol - - var StatusItem = NSStatusItem() - - class StatusItemController: NSObject { - let connectionStatusMenuItem = NSMenuItem(title: MenuTitle.statusDisconnected, - action: nil, - keyEquivalent: "") - - private enum AppIconImage { - static let statusConnected = getImage(name: "status_bar_button_image_connected") - static let statusDisconnected = getImage(name: "status_bar_button_image") - } - - private enum MenuTitle { - static let open = NSLocalizedString( - "tray_open_window", - bundle: .module, - comment: "Tray menu entry to show the application window.") - static let quit = NSLocalizedString( - "quit", - bundle: .module, - comment: "Tray menu entry to quit the application.") - static let statusConnected = NSLocalizedString( - "connected_server_state", - bundle: .module, - comment: "Tray menu entry indicating a server is currently connected and in use.") - static let statusDisconnected = NSLocalizedString( - "disconnected_server_state", - bundle: .module, - comment: "Tray menu entry indicating no server is currently connected.") - } - - override init() { - super.init() - - NSLog("[StatusItemController] Creating status menu") - StatusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) - setStatus(status: .disconnected) - - let menu = NSMenu() - let openMenuItem = NSMenuItem(title: MenuTitle.open, action: #selector(openApplication), keyEquivalent: "o") - openMenuItem.target = self - menu.addItem(openMenuItem) - menu.addItem(connectionStatusMenuItem) - menu.addItem(NSMenuItem.separator()) - let closeMenuItem = NSMenuItem(title: MenuTitle.quit, action: #selector(closeApplication), keyEquivalent: "q") - closeMenuItem.target = self - menu.addItem(closeMenuItem) - StatusItem.menu = menu - } - - func setStatus(status: ConnectionStatus) { - let isConnected = status == .connected - let appIconImage = isConnected ? AppIconImage.statusConnected : AppIconImage.statusDisconnected - appIconImage.isTemplate = true - StatusItem.button?.image = appIconImage - - let connectionStatusTitle = isConnected ? MenuTitle.statusConnected : MenuTitle.statusDisconnected - connectionStatusMenuItem.title = connectionStatusTitle - } - - @objc func openApplication(_: AnyObject?) { - NSLog("[StatusItemController] Opening application") - NSApp.activate(ignoringOtherApps: true) - guard let uiWindow = getUiWindow() else { - return - } - uiWindow.makeKeyAndOrderFront(self) - } - - @objc func closeApplication(_: AnyObject?) { - NSLog("[StatusItemController] Closing application") - NotificationCenter.default.post(name: Notification.Name("appQuit"), object: nil) - NSApplication.shared.terminate(self) - } - } - - private func getUiWindow() -> NSWindow? { - for window in NSApp.windows { - if String(describing: window).contains("UINSWindow") { - return window - } - } - return nil - } - - private func getImage(name: String) -> NSImage { - guard let image = Bundle.module.image(forResource: NSImage.Name(name)) else { - fatalError("Unable to load image asset named \(name).") - } - return image - } - -#endif diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift deleted file mode 100644 index 2df694d8cc..0000000000 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/AppKitBridgeProtocol.swift +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2023 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 - -@objc -public protocol AppKitBridgeProtocol: NSObjectProtocol { - init() - - func terminate() - - func setConnectionStatus(_ status: ConnectionStatus) - - func setAppLauncherEnabled(_ isEnabled: Bool) - - func loadMainApp(_ launcherBundleId: String) -} diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift deleted file mode 100644 index 4b811aec8c..0000000000 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/AppKitBundleLoader.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2023 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 CocoaLumberjackSwift -import Foundation -import OutlineAppKitBridgeProtocol - -enum BridgeBundle { - static let fileName = "AppKitBridge.bundle" - static let className = "OutlineAppKitBridge.AppKitBridge" -} - -public func createAppKitBridge() -> AppKitBridgeProtocol { - guard let bundleURL = Bundle.main.builtInPlugInsURL?.appendingPathComponent(BridgeBundle.fileName), - let bundle = Bundle(url: bundleURL), - let bridgeClass = bundle.classNamed(BridgeBundle.className) as? AppKitBridgeProtocol.Type else { - preconditionFailure("[AppKitBundleLoader] Failed to load AppKit bundle") - } - DDLogInfo("[AppKitBundleLoader] AppKit bundle loaded successfully") - return bridgeClass.init() -} diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift deleted file mode 100644 index 06aafc23b2..0000000000 --- a/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 appKitBridge = createAppKitBridge() - shouldLaunchMainApp { shouldLaunch in - defer { - DDLogInfo("Exiting launcher...") - 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 - } - 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/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift b/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift new file mode 100644 index 0000000000..8aa90ed06f --- /dev/null +++ b/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift @@ -0,0 +1,87 @@ +// 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 CocoaLumberjack +import CocoaLumberjackSwift +import NetworkExtension +import UIKit + +extension NSObject { + @objc public func terminate() {} + @objc public func hello() {} +} + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + DDLog.add(DDOSLogger.sharedInstance) + + let appKitController = loadAppKitIntegrationFramework2() + appKitController.hello() + shouldLaunchMainApp { shouldLaunch in + defer { + DDLogInfo("Exiting launcher...") + appKitController.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.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) + } + } +} + +func loadAppKitIntegrationFramework2() -> NSObject { + if let frameworksPath = Bundle.main.privateFrameworksPath { + let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" + do { + try Bundle(path: bundlePath)?.loadAndReturnError() + + let bundle = Bundle(path: bundlePath)! + NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") + + if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { + return appKitControllerClass.init() + } + } + catch { + NSLog("[AppKitBundleLoader] Error loading: \(error)") + } + } + preconditionFailure("[AppKitBundleLoader] Unable to load") +} diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index 9539894325..9e20513298 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -16,22 +16,28 @@ 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; - 3B0347531F212F0200C8EF1F /* VpnExtension.appex in Embed App Extensions (2 items) */ = {isa = PBXBuildFile; fileRef = 3B0347481F212F0100C8EF1F /* VpnExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 3B0347531F212F0200C8EF1F /* VpnExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 3B0347481F212F0100C8EF1F /* VpnExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 52CE53E7295B6A310064D03D /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 52CE53E6295B6A310064D03D /* Sentry */; }; 52E783062A5880CF00355E64 /* PacketTunnelProvider in Frameworks */ = {isa = PBXBuildFile; productRef = 52E783052A5880CF00355E64 /* PacketTunnelProvider */; }; 5F7F90AE0E924FD7B065C415 /* CDVStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 0394302BA6114B2AB648D4FF /* CDVStatusBar.m */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; - A271D4202A7069D8009981B2 /* OutlineLauncher in Frameworks */ = {isa = PBXBuildFile; productRef = A271D41F2A7069D8009981B2 /* OutlineLauncher */; }; - A271D4222A706CB9009981B2 /* OutlineAppKitBridge in Frameworks */ = {isa = PBXBuildFile; productRef = A271D4212A706CB9009981B2 /* OutlineAppKitBridge */; }; + A246B7D22B0700BC00ECACD5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */; }; + A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A25FB7DC2B0D4420009B6B5F /* AppKitIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = A272490D2B0D20530018A598 /* AppKitIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; A271D42D2A708240009981B2 /* AppDelegate+Outline.m in Sources */ = {isa = PBXBuildFile; fileRef = A271D42C2A708240009981B2 /* AppDelegate+Outline.m */; }; - A271D4302A708278009981B2 /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = A271D42F2A708278009981B2 /* CocoaLumberjack */; }; - A271D4322A708278009981B2 /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A271D4312A708278009981B2 /* CocoaLumberjackSwift */; }; A271D4342A70829D009981B2 /* OutlineAppleLib in Frameworks */ = {isa = PBXBuildFile; productRef = A271D4332A70829D009981B2 /* OutlineAppleLib */; }; - A27F43AA29F6EC43002C3678 /* config.xml in CopyFiles */ = {isa = PBXBuildFile; fileRef = F840E1F0165FE0F500CFE078 /* config.xml */; }; - A27F43AB29F6EC43002C3678 /* www in CopyFiles */ = {isa = PBXBuildFile; fileRef = 301BF56E109A69640062928A /* www */; }; - A2A83B392A1C5B2E00755F56 /* OutlineLauncher.app in Copy OutlineLauncher */ = {isa = PBXBuildFile; fileRef = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - A2B8C14D2A58B70E0054487E /* AppKitBridge.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = A2DBB2F62A00D2DD0017E696 /* AppKitBridge.bundle */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A2DBB2FB2A00D2F90017E696 /* AppKitBridge.bundle in Embed App Extensions (2 items) */ = {isa = PBXBuildFile; fileRef = A2DBB2F62A00D2DD0017E696 /* AppKitBridge.bundle */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 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 */; }; + A27F43AB29F6EC43002C3678 /* www in Copy Files */ = {isa = PBXBuildFile; fileRef = 301BF56E109A69640062928A /* www */; }; + A2AC1A4F2B082197004E13CB /* AppKitController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2AC1A4E2B082197004E13CB /* AppKitController.swift */; }; + A2AC1A9C2B082526004E13CB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A582B082526004E13CB /* Localizable.strings */; }; + A2AC1A9D2B082526004E13CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A9B2B082526004E13CB /* Assets.xcassets */; }; + A2C58D172B069EE7008222FC /* CatalystApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C58D162B069EE7008222FC /* CatalystApp.swift */; }; + A2C58D262B06A251008222FC /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D252B06A251008222FC /* CocoaLumberjack */; }; + A2C58D282B06A251008222FC /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D272B06A251008222FC /* CocoaLumberjackSwift */; }; FC8C310B1FAA814A004262BE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC8C310A1FAA814A004262BE /* NetworkExtension.framework */; }; FC8C310C1FAA88FB004262BE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC8C310A1FAA814A004262BE /* NetworkExtension.framework */; }; /* End PBXBuildFile section */ @@ -65,73 +71,66 @@ remoteGlobalIDString = C0C01EB21E3911D50056E6CB; remoteInfo = Cordova; }; - A2B8C14E2A58B70E0054487E /* PBXContainerItemProxy */ = { + A246B7E62B07AADD00ECACD5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; proxyType = 1; - remoteGlobalIDString = A2DBB2F52A00D2DD0017E696; - remoteInfo = AppKitBridge; + remoteGlobalIDString = A246B7DC2B07AACF00ECACD5; + remoteInfo = AppKitIntegration; }; - A2DBB3032A00D5F90017E696 /* PBXContainerItemProxy */ = { + A246B7FD2B07B25C00ECACD5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; proxyType = 1; - remoteGlobalIDString = A2DBB2F52A00D2DD0017E696; - remoteInfo = AppKitBridge; - }; - A2F6068D2A1C6D4A0039183A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = A26D262C2A1C41B1009838E0; - remoteInfo = OutlineLauncher; + remoteGlobalIDString = A246B7DC2B07AACF00ECACD5; + remoteInfo = AppKitIntegration; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 3B0347571F212F0200C8EF1F /* Embed App Extensions (2 items) */ = { + 3B0347571F212F0200C8EF1F /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - A2DBB2FB2A00D2F90017E696 /* AppKitBridge.bundle in Embed App Extensions (2 items) */, - 3B0347531F212F0200C8EF1F /* VpnExtension.appex in Embed App Extensions (2 items) */, + 3B0347531F212F0200C8EF1F /* VpnExtension.appex in Embed App Extensions */, ); - name = "Embed App Extensions (2 items)"; + name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - A27F43A929F6EC1C002C3678 /* CopyFiles */ = { + A246B7E82B07AADD00ECACD5 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; - dstSubfolderSpec = 7; + dstSubfolderSpec = 10; files = ( - A27F43AA29F6EC43002C3678 /* config.xml in CopyFiles */, - A27F43AB29F6EC43002C3678 /* www in CopyFiles */, + A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */, ); + name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - A2A83B382A1C5B0C00755F56 /* Copy OutlineLauncher */ = { + A27B364E2B07C3F400004A08 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 12; - dstPath = Contents/Library/LoginItems; - dstSubfolderSpec = 1; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; files = ( - A2A83B392A1C5B2E00755F56 /* OutlineLauncher.app in Copy OutlineLauncher */, + A27B364F2B07C40100004A08 /* AppKitIntegration.framework in Embed Frameworks */, ); - name = "Copy OutlineLauncher"; + name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - A2B8C1502A58B70E0054487E /* Embed PlugIns */ = { + A27F43A929F6EC1C002C3678 /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; - dstSubfolderSpec = 13; + dstSubfolderSpec = 7; files = ( - A2B8C14D2A58B70E0054487E /* AppKitBridge.bundle in Embed PlugIns */, + A27F43AA29F6EC43002C3678 /* config.xml in Copy Files */, + A27F43AB29F6EC43002C3678 /* www in Copy Files */, ); - name = "Embed PlugIns"; + name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -161,11 +160,85 @@ 91E45572BB494E9299D2DD41 /* CDVClipboard.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVClipboard.m; path = "cordova-plugin-clipboard/CDVClipboard.m"; sourceTree = ""; }; 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; }; + A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppKitIntegration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A246B7DF2B07AACF00ECACD5 /* AppKitIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitIntegration.h; sourceTree = ""; }; 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 = ""; }; + A2702E892B055C8C00BB0E9C /* AppKitBridgeInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitBridgeInterface.h; 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 = ""; }; - A2DBB2F62A00D2DD0017E696 /* AppKitBridge.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppKitBridge.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + A272490D2B0D20530018A598 /* AppKitIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitIntegration.h; sourceTree = ""; }; + A2AC1A4E2B082197004E13CB /* AppKitController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppKitController.swift; sourceTree = ""; }; + A2AC1A502B0821A7004E13CB /* StatusItemController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemController.swift; sourceTree = ""; }; + A2AC1A592B082526004E13CB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A5A2B082526004E13CB /* ur */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ur; path = ur.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A5B2B082526004E13CB /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A5C2B082526004E13CB /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A5D2B082526004E13CB /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A5E2B082526004E13CB /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A5F2B082526004E13CB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A602B082526004E13CB /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = fa.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A612B082526004E13CB /* mr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mr; path = mr.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A622B082526004E13CB /* mk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mk; path = mk.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A632B082526004E13CB /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A642B082526004E13CB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A652B082526004E13CB /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A662B082526004E13CB /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A672B082526004E13CB /* am */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = am; path = am.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A682B082526004E13CB /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A692B082526004E13CB /* sw */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sw; path = sw.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A6A2B082526004E13CB /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A6B2B082526004E13CB /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A6C2B082526004E13CB /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A6D2B082526004E13CB /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-419"; path = "es-419.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A6E2B082526004E13CB /* et */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = et; path = et.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A6F2B082526004E13CB /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A702B082526004E13CB /* bg */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bg; path = bg.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A712B082526004E13CB /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A722B082526004E13CB /* sr-Latn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "sr-Latn"; path = "sr-Latn.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A732B082526004E13CB /* kk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kk; path = kk.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A742B082526004E13CB /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A752B082526004E13CB /* ms */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ms; path = ms.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A762B082526004E13CB /* si */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = si; path = si.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A772B082526004E13CB /* ta */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ta; path = ta.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A782B082526004E13CB /* ne */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ne; path = ne.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A792B082526004E13CB /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7A2B082526004E13CB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7B2B082526004E13CB /* km */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = km; path = km.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7C2B082526004E13CB /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7D2B082526004E13CB /* fil */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fil; path = fil.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7E2B082526004E13CB /* hy */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hy; path = hy.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A7F2B082526004E13CB /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A802B082526004E13CB /* mn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mn; path = mn.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A812B082526004E13CB /* my */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = my; path = my.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A822B082526004E13CB /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A832B082526004E13CB /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A842B082526004E13CB /* ka */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ka; path = ka.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A852B082526004E13CB /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A862B082526004E13CB /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A872B082526004E13CB /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A882B082526004E13CB /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A892B082526004E13CB /* lv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lv; path = lv.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8A2B082526004E13CB /* lo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lo; path = lo.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8B2B082526004E13CB /* lt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lt; path = lt.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8C2B082526004E13CB /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8D2B082526004E13CB /* af */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = af; path = af.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8E2B082526004E13CB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A8F2B082526004E13CB /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A902B082526004E13CB /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A912B082526004E13CB /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A922B082526004E13CB /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A932B082526004E13CB /* az */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = az; path = az.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A942B082526004E13CB /* bn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bn; path = bn.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A952B082526004E13CB /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = ""; }; + A2AC1A962B082526004E13CB /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A972B082526004E13CB /* bs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bs; path = bs.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A982B082526004E13CB /* hr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hr; path = hr.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A992B082526004E13CB /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A9A2B082526004E13CB /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = ""; }; + A2AC1A9B2B082526004E13CB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A2C58D162B069EE7008222FC /* CatalystApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatalystApp.swift; sourceTree = ""; }; AAFAFA54943F490EAF4CD5BC /* OutlinePlugin.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = OutlinePlugin.swift; path = "cordova-plugin-outline/OutlinePlugin.swift"; sourceTree = ""; }; EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; @@ -181,11 +254,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A271D4302A708278009981B2 /* CocoaLumberjack in Frameworks */, + A27B36512B07C51500004A08 /* CocoaLumberjack in Frameworks */, 301BF552109A68D80062928A /* libCordova.a in Frameworks */, FC8C310C1FAA88FB004262BE /* NetworkExtension.framework in Frameworks */, - A271D4322A708278009981B2 /* CocoaLumberjackSwift in Frameworks */, A271D4342A70829D009981B2 /* OutlineAppleLib in Frameworks */, + A27B36532B07C51500004A08 /* CocoaLumberjackSwift in Frameworks */, 52CE53E7295B6A310064D03D /* Sentry in Frameworks */, 1CE7466BA73B4CCB838EBE21 /* libz.tbd in Frameworks */, ); @@ -200,19 +273,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A26D262A2A1C41B1009838E0 /* Frameworks */ = { + A246B7DA2B07AACF00ECACD5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A271D4202A7069D8009981B2 /* OutlineLauncher in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - A2DBB2F32A00D2DD0017E696 /* Frameworks */ = { + A26D262A2A1C41B1009838E0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A271D4222A706CB9009981B2 /* OutlineAppKitBridge in Frameworks */, + A2C58D262B06A251008222FC /* CocoaLumberjack in Frameworks */, + A2C58D282B06A251008222FC /* CocoaLumberjackSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -222,6 +295,8 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + A2C58D152B069ECB008222FC /* CatalystApp */, + A2C58D0B2B069CC8008222FC /* AppKitBridge */, 302D95EE14D2391D003F00A1 /* MainViewController.h */, 302D95EF14D2391D003F00A1 /* MainViewController.m */, 302D95F014D2391D003F00A1 /* MainViewController.xib */, @@ -239,8 +314,8 @@ children = ( 1D6058910D05DD3D006BFB54 /* Outline.app */, 3B0347481F212F0100C8EF1F /* VpnExtension.appex */, - A2DBB2F62A00D2DD0017E696 /* AppKitBridge.bundle */, A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */, + A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */, ); name = Products; sourceTree = ""; @@ -248,6 +323,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + A2C58D222B06A1F9008222FC /* Launcher */, F6D33648296CF46200AFD613 /* Packages */, 3B0347431F212E6500C8EF1F /* Outline.entitlements */, EB87FDF41871DAF40020F90C /* config.xml */, @@ -260,6 +336,8 @@ 29B97317FDCFA39411CA2CEA /* Resources */, 3B0347491F212F0200C8EF1F /* VpnExtension */, A26D262E2A1C41B1009838E0 /* OutlineLauncher */, + A2702E882B055C8C00BB0E9C /* AppKitBridgeInterface */, + A246B7DE2B07AACF00ECACD5 /* AppKitIntegration */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -340,6 +418,14 @@ path = Outline/Resources/vpn; sourceTree = ""; }; + A246B7DE2B07AACF00ECACD5 /* AppKitIntegration */ = { + isa = PBXGroup; + children = ( + A246B7DF2B07AACF00ECACD5 /* AppKitIntegration.h */, + ); + path = AppKitIntegration; + sourceTree = ""; + }; A26D262E2A1C41B1009838E0 /* OutlineLauncher */ = { isa = PBXGroup; children = ( @@ -348,6 +434,58 @@ path = OutlineLauncher; sourceTree = ""; }; + A2702E882B055C8C00BB0E9C /* AppKitBridgeInterface */ = { + isa = PBXGroup; + children = ( + A2702E892B055C8C00BB0E9C /* AppKitBridgeInterface.h */, + ); + path = AppKitBridgeInterface; + sourceTree = ""; + }; + A2AC1A562B082526004E13CB /* Resources */ = { + isa = PBXGroup; + children = ( + A2AC1A572B082526004E13CB /* Strings */, + A2AC1A9B2B082526004E13CB /* Assets.xcassets */, + ); + path = Resources; + sourceTree = ""; + }; + A2AC1A572B082526004E13CB /* Strings */ = { + isa = PBXGroup; + children = ( + A2AC1A582B082526004E13CB /* Localizable.strings */, + ); + path = Strings; + sourceTree = ""; + }; + A2C58D0B2B069CC8008222FC /* AppKitBridge */ = { + isa = PBXGroup; + children = ( + A2AC1A562B082526004E13CB /* Resources */, + A2AC1A4E2B082197004E13CB /* AppKitController.swift */, + A2AC1A502B0821A7004E13CB /* StatusItemController.swift */, + A272490D2B0D20530018A598 /* AppKitIntegration.h */, + ); + path = AppKitBridge; + sourceTree = ""; + }; + A2C58D152B069ECB008222FC /* CatalystApp */ = { + isa = PBXGroup; + children = ( + A2C58D162B069EE7008222FC /* CatalystApp.swift */, + ); + path = CatalystApp; + sourceTree = ""; + }; + A2C58D222B06A1F9008222FC /* Launcher */ = { + isa = PBXGroup; + children = ( + A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */, + ); + path = Launcher; + sourceTree = ""; + }; EB87FDF11871DA420020F90C /* Staging */ = { isa = PBXGroup; children = ( @@ -367,33 +505,43 @@ }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + A272490C2B0D20200018A598 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A25FB7DC2B0D4420009B6B5F /* AppKitIntegration.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* Outline */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Outline" */; buildPhases = ( - A27F43A929F6EC1C002C3678 /* CopyFiles */, + A27F43A929F6EC1C002C3678 /* Copy Files */, 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, - A2A83B382A1C5B0C00755F56 /* Copy OutlineLauncher */, - 3B0347571F212F0200C8EF1F /* Embed App Extensions (2 items) */, + 3B0347571F212F0200C8EF1F /* Embed App Extensions */, + A246B7E82B07AADD00ECACD5 /* Embed Frameworks */, FC0FFD6C1FCCE21E00EB0129 /* Remove unused framework architectures */, ); buildRules = ( ); dependencies = ( - A2F6068E2A1C6D4A0039183A /* PBXTargetDependency */, - A2DBB3042A00D5F90017E696 /* PBXTargetDependency */, 301BF551109A68C00062928A /* PBXTargetDependency */, 3B0347521F212F0200C8EF1F /* PBXTargetDependency */, + A246B7E72B07AADD00ECACD5 /* PBXTargetDependency */, ); name = Outline; packageProductDependencies = ( 52CE53E6295B6A310064D03D /* Sentry */, - A271D42F2A708278009981B2 /* CocoaLumberjack */, - A271D4312A708278009981B2 /* CocoaLumberjackSwift */, A271D4332A70829D009981B2 /* OutlineAppleLib */, + A27B36502B07C51500004A08 /* CocoaLumberjack */, + A27B36522B07C51500004A08 /* CocoaLumberjackSwift */, ); productName = Outline; productReference = 1D6058910D05DD3D006BFB54 /* Outline.app */; @@ -418,45 +566,47 @@ productReference = 3B0347481F212F0100C8EF1F /* VpnExtension.appex */; productType = "com.apple.product-type.app-extension"; }; - A26D262C2A1C41B1009838E0 /* OutlineLauncher */ = { + A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */ = { isa = PBXNativeTarget; - buildConfigurationList = A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */; + buildConfigurationList = A246B7E12B07AACF00ECACD5 /* Build configuration list for PBXNativeTarget "AppKitIntegration" */; buildPhases = ( - A25EB8812A8437D700B92EE0 /* Sources */, - A26D262A2A1C41B1009838E0 /* Frameworks */, - A2B8C1502A58B70E0054487E /* Embed PlugIns */, + A272490C2B0D20200018A598 /* Headers */, + A246B7D92B07AACF00ECACD5 /* Sources */, + A246B7DA2B07AACF00ECACD5 /* Frameworks */, + A246B7DB2B07AACF00ECACD5 /* Resources */, ); buildRules = ( ); dependencies = ( - A2B8C14F2A58B70E0054487E /* PBXTargetDependency */, ); - name = OutlineLauncher; + name = AppKitIntegration; packageProductDependencies = ( - A271D41F2A7069D8009981B2 /* OutlineLauncher */, ); - productName = OutlineLauncher; - productReference = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; - productType = "com.apple.product-type.application"; + productName = AppKitIntegration; + productReference = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; + productType = "com.apple.product-type.framework"; }; - A2DBB2F52A00D2DD0017E696 /* AppKitBridge */ = { + A26D262C2A1C41B1009838E0 /* OutlineLauncher */ = { isa = PBXNativeTarget; - buildConfigurationList = A2DBB2F72A00D2DD0017E696 /* Build configuration list for PBXNativeTarget "AppKitBridge" */; + buildConfigurationList = A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */; buildPhases = ( - A2DBB2F22A00D2DD0017E696 /* Sources */, - A2DBB2F32A00D2DD0017E696 /* Frameworks */, + A27B364E2B07C3F400004A08 /* Embed Frameworks */, + A25EB8812A8437D700B92EE0 /* Sources */, + A26D262A2A1C41B1009838E0 /* Frameworks */, ); buildRules = ( ); dependencies = ( + A246B7FE2B07B25C00ECACD5 /* PBXTargetDependency */, ); - name = AppKitBridge; + name = OutlineLauncher; packageProductDependencies = ( - A271D4212A706CB9009981B2 /* OutlineAppKitBridge */, + A2C58D252B06A251008222FC /* CocoaLumberjack */, + A2C58D272B06A251008222FC /* CocoaLumberjackSwift */, ); - productName = AppKitBridge; - productReference = A2DBB2F62A00D2DD0017E696 /* AppKitBridge.bundle */; - productType = "com.apple.product-type.bundle"; + productName = OutlineLauncher; + productReference = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; + productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -484,12 +634,11 @@ }; }; }; - A26D262C2A1C41B1009838E0 = { - CreatedOnToolsVersion = 14.3; + A246B7DC2B07AACF00ECACD5 = { + CreatedOnToolsVersion = 15.0.1; }; - A2DBB2F52A00D2DD0017E696 = { + A26D262C2A1C41B1009838E0 = { CreatedOnToolsVersion = 14.3; - LastSwiftMigration = 1430; }; }; }; @@ -500,6 +649,72 @@ knownRegions = ( en, Base, + de, + ur, + he, + ar, + el, + "zh-Hans", + ja, + fa, + mr, + mk, + sq, + uk, + "en-GB", + am, + es, + sw, + is, + sl, + da, + "es-419", + et, + it, + bg, + sk, + "sr-Latn", + kk, + sr, + ms, + si, + ta, + ne, + sv, + cs, + km, + ko, + fil, + hy, + "zh-Hant", + mn, + my, + no, + nb, + hu, + ka, + tr, + pl, + "pt-BR", + vi, + lv, + lo, + lt, + ru, + af, + fr, + fi, + id, + nl, + th, + az, + bn, + "pt-PT", + ro, + bs, + hr, + hi, + ca, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; packageReferences = ( @@ -517,8 +732,8 @@ targets = ( 1D6058900D05DD3D006BFB54 /* Outline */, 3B0347471F212F0100C8EF1F /* VpnExtension */, - A2DBB2F52A00D2DD0017E696 /* AppKitBridge */, A26D262C2A1C41B1009838E0 /* OutlineLauncher */, + A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */, ); }; /* End PBXProject section */ @@ -551,6 +766,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A246B7DB2B07AACF00ECACD5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A2AC1A9D2B082526004E13CB /* Assets.xcassets in Resources */, + A2AC1A9C2B082526004E13CB /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -577,6 +801,7 @@ files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, + A2C58D172B069EE7008222FC /* CatalystApp.swift in Sources */, 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, 5F7F90AE0E924FD7B065C415 /* CDVStatusBar.m in Sources */, 2A617D29B96942E58B082FAC /* OutlinePlugin.swift in Sources */, @@ -592,17 +817,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A25EB8812A8437D700B92EE0 /* Sources */ = { + A246B7D92B07AACF00ECACD5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A272490F2B0D24200018A598 /* StatusItemController.swift in Sources */, + A2AC1A4F2B082197004E13CB /* AppKitController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A2DBB2F22A00D2DD0017E696 /* Sources */ = { + A25EB8812A8437D700B92EE0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A246B7D22B0700BC00ECACD5 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -619,31 +847,102 @@ target = 3B0347471F212F0100C8EF1F /* VpnExtension */; targetProxy = 3B0347511F212F0200C8EF1F /* PBXContainerItemProxy */; }; - A2B8C14F2A58B70E0054487E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = maccatalyst; - target = A2DBB2F52A00D2DD0017E696 /* AppKitBridge */; - targetProxy = A2B8C14E2A58B70E0054487E /* PBXContainerItemProxy */; - }; - A2DBB3042A00D5F90017E696 /* PBXTargetDependency */ = { + A246B7E72B07AADD00ECACD5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = maccatalyst; - target = A2DBB2F52A00D2DD0017E696 /* AppKitBridge */; - targetProxy = A2DBB3032A00D5F90017E696 /* PBXContainerItemProxy */; + target = A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */; + targetProxy = A246B7E62B07AADD00ECACD5 /* PBXContainerItemProxy */; }; - A2F6068E2A1C6D4A0039183A /* PBXTargetDependency */ = { + A246B7FE2B07B25C00ECACD5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = maccatalyst; - target = A26D262C2A1C41B1009838E0 /* OutlineLauncher */; - targetProxy = A2F6068D2A1C6D4A0039183A /* PBXContainerItemProxy */; + target = A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */; + targetProxy = A246B7FD2B07B25C00ECACD5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + A2AC1A582B082526004E13CB /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A2AC1A592B082526004E13CB /* de */, + A2AC1A5A2B082526004E13CB /* ur */, + A2AC1A5B2B082526004E13CB /* he */, + A2AC1A5C2B082526004E13CB /* ar */, + A2AC1A5D2B082526004E13CB /* el */, + A2AC1A5E2B082526004E13CB /* zh-Hans */, + A2AC1A5F2B082526004E13CB /* ja */, + A2AC1A602B082526004E13CB /* fa */, + A2AC1A612B082526004E13CB /* mr */, + A2AC1A622B082526004E13CB /* mk */, + A2AC1A632B082526004E13CB /* sq */, + A2AC1A642B082526004E13CB /* en */, + A2AC1A652B082526004E13CB /* uk */, + A2AC1A662B082526004E13CB /* en-GB */, + A2AC1A672B082526004E13CB /* am */, + A2AC1A682B082526004E13CB /* es */, + A2AC1A692B082526004E13CB /* sw */, + A2AC1A6A2B082526004E13CB /* is */, + A2AC1A6B2B082526004E13CB /* sl */, + A2AC1A6C2B082526004E13CB /* da */, + A2AC1A6D2B082526004E13CB /* es-419 */, + A2AC1A6E2B082526004E13CB /* et */, + A2AC1A6F2B082526004E13CB /* it */, + A2AC1A702B082526004E13CB /* bg */, + A2AC1A712B082526004E13CB /* sk */, + A2AC1A722B082526004E13CB /* sr-Latn */, + A2AC1A732B082526004E13CB /* kk */, + A2AC1A742B082526004E13CB /* sr */, + A2AC1A752B082526004E13CB /* ms */, + A2AC1A762B082526004E13CB /* si */, + A2AC1A772B082526004E13CB /* ta */, + A2AC1A782B082526004E13CB /* ne */, + A2AC1A792B082526004E13CB /* sv */, + A2AC1A7A2B082526004E13CB /* cs */, + A2AC1A7B2B082526004E13CB /* km */, + A2AC1A7C2B082526004E13CB /* ko */, + A2AC1A7D2B082526004E13CB /* fil */, + A2AC1A7E2B082526004E13CB /* hy */, + A2AC1A7F2B082526004E13CB /* zh-Hant */, + A2AC1A802B082526004E13CB /* mn */, + A2AC1A812B082526004E13CB /* my */, + A2AC1A822B082526004E13CB /* no */, + A2AC1A832B082526004E13CB /* hu */, + A2AC1A842B082526004E13CB /* ka */, + A2AC1A852B082526004E13CB /* tr */, + A2AC1A862B082526004E13CB /* pl */, + A2AC1A872B082526004E13CB /* pt-BR */, + A2AC1A882B082526004E13CB /* vi */, + A2AC1A892B082526004E13CB /* lv */, + A2AC1A8A2B082526004E13CB /* lo */, + A2AC1A8B2B082526004E13CB /* lt */, + A2AC1A8C2B082526004E13CB /* ru */, + A2AC1A8D2B082526004E13CB /* af */, + A2AC1A8E2B082526004E13CB /* fr */, + A2AC1A8F2B082526004E13CB /* fi */, + A2AC1A902B082526004E13CB /* id */, + A2AC1A912B082526004E13CB /* nl */, + A2AC1A922B082526004E13CB /* th */, + A2AC1A932B082526004E13CB /* az */, + A2AC1A942B082526004E13CB /* bn */, + A2AC1A952B082526004E13CB /* pt-PT */, + A2AC1A962B082526004E13CB /* ro */, + A2AC1A972B082526004E13CB /* bs */, + A2AC1A982B082526004E13CB /* hr */, + A2AC1A992B082526004E13CB /* hi */, + A2AC1A9A2B082526004E13CB /* ca */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -668,6 +967,13 @@ GCC_PREFIX_HEADER = "Outline/Outline-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + "$(OBJROOT)/**", + ); INFOPLIST_FILE = "Outline/Outline-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -692,6 +998,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -715,6 +1022,13 @@ GCC_PREFIX_HEADER = "Outline/Outline-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + "$(OBJROOT)/**", + ); INFOPLIST_FILE = "Outline/Outline-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -844,10 +1158,11 @@ }; name = Release; }; - A26D263A2A1C41B4009838E0 /* Debug */ = { + A246B7E22B07AACF00ECACD5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -857,16 +1172,19 @@ 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; + DEFINES_MODULE = YES; DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_HARDENED_RUNTIME = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -876,36 +1194,39 @@ 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 = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", + "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.3; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher3; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.AppKitIntegration; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 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_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 2; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - A26D263B2A1C41B4009838E0 /* Release */ = { + A246B7E32B07AACF00ECACD5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -915,65 +1236,72 @@ 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_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; DEVELOPMENT_TEAM = QT8Z3Q9V3A; - ENABLE_HARDENED_RUNTIME = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; 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 = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", + "@loader_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.3; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.launcher3; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.AppKitIntegration; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 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_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 2; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - A2DBB2F82A00D2DD0017E696 /* Debug */ = { + A26D263A2A1C41B4009838E0 /* Debug */ = { isa = XCBuildConfiguration; 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; @@ -984,39 +1312,47 @@ 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 = ""; - INFOPLIST_KEY_NSPrincipalClass = "$(PRODUCT_MODULE_NAME).AppKitBridge"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.AppKitBridge; + 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 = "Outline/Classes/AppKitBridge/AppKitBridge-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - WRAPPER_EXTENSION = bundle; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - A2DBB2F92A00D2DD0017E696 /* Release */ = { + A26D263B2A1C41B4009838E0 /* Release */ = { isa = XCBuildConfiguration; 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; @@ -1024,26 +1360,35 @@ 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 = ""; - INFOPLIST_KEY_NSPrincipalClass = "$(PRODUCT_MODULE_NAME).AppKitBridge"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 13.3; MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.outline.macos.client.AppKitBridge; + 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 = "Outline/Classes/AppKitBridge/AppKitBridge-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - WRAPPER_EXTENSION = bundle; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; @@ -1072,6 +1417,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; @@ -1082,11 +1428,20 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + "\"$(OBJROOT)\"", + "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include", + ); IPHONEOS_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.3; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SKIP_INSTALL = NO; + SWIFT_OBJC_BRIDGING_HEADER = ""; }; name = Debug; }; @@ -1115,6 +1470,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; @@ -1125,11 +1481,20 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + "\"$(OBJROOT)\"", + "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include", + ); IPHONEOS_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.3; SDKROOT = iphoneos; SKIP_INSTALL = NO; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OBJC_BRIDGING_HEADER = ""; }; name = Release; }; @@ -1154,20 +1519,20 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */ = { + A246B7E12B07AACF00ECACD5 /* Build configuration list for PBXNativeTarget "AppKitIntegration" */ = { isa = XCConfigurationList; buildConfigurations = ( - A26D263A2A1C41B4009838E0 /* Debug */, - A26D263B2A1C41B4009838E0 /* Release */, + A246B7E22B07AACF00ECACD5 /* Debug */, + A246B7E32B07AACF00ECACD5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A2DBB2F72A00D2DD0017E696 /* Build configuration list for PBXNativeTarget "AppKitBridge" */ = { + A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */ = { isa = XCConfigurationList; buildConfigurations = ( - A2DBB2F82A00D2DD0017E696 /* Debug */, - A2DBB2F92A00D2DD0017E696 /* Release */, + A26D263A2A1C41B4009838E0 /* Debug */, + A26D263B2A1C41B4009838E0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1212,27 +1577,29 @@ isa = XCSwiftPackageProductDependency; productName = PacketTunnelProvider; }; - A271D41F2A7069D8009981B2 /* OutlineLauncher */ = { - isa = XCSwiftPackageProductDependency; - productName = OutlineLauncher; - }; - A271D4212A706CB9009981B2 /* OutlineAppKitBridge */ = { + A271D4332A70829D009981B2 /* OutlineAppleLib */ = { isa = XCSwiftPackageProductDependency; - productName = OutlineAppKitBridge; + productName = OutlineAppleLib; }; - A271D42F2A708278009981B2 /* CocoaLumberjack */ = { + A27B36502B07C51500004A08 /* CocoaLumberjack */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjack; }; - A271D4312A708278009981B2 /* CocoaLumberjackSwift */ = { + A27B36522B07C51500004A08 /* CocoaLumberjackSwift */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjackSwift; }; - A271D4332A70829D009981B2 /* OutlineAppleLib */ = { + A2C58D252B06A251008222FC /* CocoaLumberjack */ = { isa = XCSwiftPackageProductDependency; - productName = OutlineAppleLib; + package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; + productName = CocoaLumberjack; + }; + A2C58D272B06A251008222FC /* CocoaLumberjackSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; + productName = CocoaLumberjackSwift; }; /* End XCSwiftPackageProductDependency section */ }; diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme b/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme index e1b609e05b..28940f2c24 100644 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/xcshareddata/xcschemes/Outline.xcscheme @@ -26,10 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - String? { + guard let bundleId = Bundle.main.bundleIdentifier else { + NSLog("[AppKitController] Failed to retrieve the application's bundle ID.") + return nil + } + return String(format: "%@.%@", bundleId, AppKitController.kAppLauncherName) +} + +/// Returns the main application's bundle ID from the embedded launcher bundle ID. +private func getMainBundleId(_ launcherBundleId: String) -> String { + return (launcherBundleId as NSString).deletingPathExtension +} diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h similarity index 69% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h index bf0171db45..9fb2129d2f 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridgeProtocol/ConnectionStatus.swift +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitIntegration.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -@objc public enum ConnectionStatus: Int { - case unknown - case connected - case disconnected -} +#import + +//! Project version number for AppKitIntegration. +FOUNDATION_EXPORT double AppKitIntegrationVersionNumber; + +//! Project version string for AppKitIntegration. +FOUNDATION_EXPORT const unsigned char AppKitIntegrationVersionString[]; diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/Contents.json b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/Contents.json rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/Contents.json diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/Contents.json diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image.imageset/outline-black-off-2x.png diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/Contents.json diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Assets.xcassets/status_bar_button_image_connected.imageset/outline-black-on-2x.png diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/af.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/af.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/af.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/am.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/am.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/am.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ar.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ar.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ar.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/az.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/az.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/az.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bg.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bg.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bg.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bn.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bn.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bn.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bs.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/bs.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/bs.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ca.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ca.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ca.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/cs.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/cs.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/cs.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/da.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/da.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/da.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/de.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/de.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/de.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/el.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/el.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/el.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en-GB.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/en.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/en.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/en.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es-419.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/es.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/es.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/es.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/et.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/et.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/et.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fa.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fa.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fa.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fi.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fi.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fi.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fil.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fil.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fil.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fr.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/fr.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/fr.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/he.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/he.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/he.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hi.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hi.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hi.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hr.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hr.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hr.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hu.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hu.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hu.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hy.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/hy.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/hy.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/id.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/id.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/id.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/is.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/is.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/is.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/it.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/it.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/it.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ja.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ja.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ja.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ka.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ka.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ka.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/kk.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/kk.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/kk.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/km.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/km.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/km.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ko.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ko.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ko.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lo.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lo.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lo.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lt.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lt.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lt.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lv.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/lv.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/lv.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mk.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mk.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mk.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mn.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mn.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mn.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mr.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/mr.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/mr.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ms.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ms.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ms.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/my.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/my.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/my.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ne.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ne.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ne.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/nl.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/nl.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/nl.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/no.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/no.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/no.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pl.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pl.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pl.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-BR.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/pt-PT.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ro.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ro.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ro.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ru.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ru.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ru.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/si.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/si.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/si.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sk.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sk.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sk.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sl.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sl.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sl.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sq.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sq.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sq.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr-Latn.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sr.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sr.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sr.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sv.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sv.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sv.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sw.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/sw.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/sw.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ta.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ta.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ta.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/th.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/th.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/th.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/tr.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/tr.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/tr.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/uk.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/uk.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/uk.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ur.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/ur.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/ur.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/vi.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/vi.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/vi.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hans.lproj/Localizable.strings diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings similarity index 100% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineAppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings rename to src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/Resources/Strings/zh-Hant.lproj/Localizable.strings diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift new file mode 100644 index 0000000000..1a7fd7fe1a --- /dev/null +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift @@ -0,0 +1,115 @@ +// Copyright 2023 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 AppKit + +@objc +public enum ConnectionStatus: Int { + case unknown + case connected + case disconnected +} + +var StatusItem = NSStatusItem() + +class StatusItemController: NSObject { + let connectionStatusMenuItem = NSMenuItem(title: MenuTitle.statusDisconnected, + action: nil, + keyEquivalent: "") + + private enum AppIconImage { + static let statusConnected = getImage(name: "status_bar_button_image_connected") + static let statusDisconnected = getImage(name: "status_bar_button_image") + } + + private enum MenuTitle { + static let open = NSLocalizedString( + "tray_open_window", + bundle: Bundle(for: StatusItemController.self), + comment: "Tray menu entry to show the application window.") + static let quit = NSLocalizedString( + "quit", + bundle: Bundle(for: StatusItemController.self), + comment: "Tray menu entry to quit the application.") + static let statusConnected = NSLocalizedString( + "connected_server_state", + bundle: Bundle(for: StatusItemController.self), + comment: "Tray menu entry indicating a server is currently connected and in use.") + static let statusDisconnected = NSLocalizedString( + "disconnected_server_state", + bundle: Bundle(for: StatusItemController.self), + comment: "Tray menu entry indicating no server is currently connected.") + } + + override init() { + super.init() + + NSLog("[StatusItemController] Creating status menu") + StatusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) + setStatus(status: .disconnected) + + let menu = NSMenu() + let openMenuItem = NSMenuItem(title: MenuTitle.open, action: #selector(openApplication), keyEquivalent: "o") + openMenuItem.target = self + menu.addItem(openMenuItem) + menu.addItem(connectionStatusMenuItem) + menu.addItem(NSMenuItem.separator()) + let closeMenuItem = NSMenuItem(title: MenuTitle.quit, action: #selector(closeApplication), keyEquivalent: "q") + closeMenuItem.target = self + menu.addItem(closeMenuItem) + StatusItem.menu = menu + } + + func setStatus(status: ConnectionStatus) { + NSLog("[StatusItemController] Setting status: \(status)") + let isConnected = status == .connected + let appIconImage = isConnected ? AppIconImage.statusConnected : AppIconImage.statusDisconnected + appIconImage.isTemplate = true + StatusItem.button?.image = appIconImage + + let connectionStatusTitle = isConnected ? MenuTitle.statusConnected : MenuTitle.statusDisconnected + connectionStatusMenuItem.title = connectionStatusTitle + } + + @objc func openApplication(_: AnyObject?) { + NSLog("[StatusItemController] Opening application") + NSApp.activate(ignoringOtherApps: true) + guard let uiWindow = getUiWindow() else { + return + } + uiWindow.makeKeyAndOrderFront(self) + } + + @objc func closeApplication(_: AnyObject?) { + NSLog("[StatusItemController] Closing application") + NotificationCenter.default.post(name: Notification.Name("appQuit"), object: nil) + NSApplication.shared.terminate(self) + } +} + +private func getUiWindow() -> NSWindow? { + for window in NSApp.windows { + if String(describing: window).contains("UINSWindow") { + return window + } + } + return nil +} + +private func getImage(name: String) -> NSImage { + guard let image = Bundle(for: StatusItemController.self).image(forResource: NSImage.Name(name)) else { + fatalError("Unable to load image asset named \(name).") + } + return image +} diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift b/src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift similarity index 58% rename from src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift rename to src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift index 555a8054e9..0c4504a497 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/OutlineCatalystApp.swift +++ b/src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift @@ -13,18 +13,32 @@ // limitations under the License. #if targetEnvironment(macCatalyst) + import CocoaLumberjack import CocoaLumberjackSwift import Foundation import OutlineNotification import ServiceManagement + @objc + public enum ConnectionStatus: Int { + case unknown + case connected + case disconnected + } + + extension NSObject { + @objc public func terminate() {} + @objc public func setConnectionStatus(_ status: ConnectionStatus) {} + } + @objcMembers public class OutlineCatalystApp: NSObject { + public static func initApp() { DDLog.add(DDOSLogger.sharedInstance) - let appKitBridge = createAppKitBridge() + let appKitController = loadAppKitIntegrationFramework() // Configure the window. let scenes = UIApplication.shared.connectedScenes @@ -38,23 +52,44 @@ // Initiate the connection status menu in unknown state by default. // TODO: Check status in case the the VPN is already running. - appKitBridge.setConnectionStatus(.unknown) + appKitController.setConnectionStatus(.unknown) NotificationCenter.default.addObserver(forName: NSNotification.kVpnConnected, object: nil, queue: nil) { _ in - appKitBridge.setConnectionStatus(.connected) + appKitController.setConnectionStatus(.connected) } NotificationCenter.default.addObserver(forName: NSNotification.kVpnDisconnected, object: nil, queue: nil) { _ in - appKitBridge.setConnectionStatus(.disconnected) + appKitController.setConnectionStatus(.disconnected) } - // Enable app launcher to start on boot. - appKitBridge.setAppLauncherEnabled(true) +// // Enable app launcher to start on boot. +// appKitController.setAppLauncherEnabled(true) + } + } + + func loadAppKitIntegrationFramework() -> NSObject { + if let frameworksPath = Bundle.main.privateFrameworksPath { + let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" + do { + try Bundle(path: bundlePath)?.loadAndReturnError() + + let bundle = Bundle(path: bundlePath)! + NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") + + if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { + return appKitControllerClass.init() + } + } + catch { + NSLog("[AppKitBundleLoader] Error loading: \(error)") + } } + preconditionFailure("[AppKitBundleLoader] Unable to load") } + #endif From 82b7279ae4fc0dcace6d7d08fc989b92a2a19d96 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 18:02:49 -0500 Subject: [PATCH 11/19] Move the catalyst app module back to SPM. --- .../apple/OutlineAppleLib/Package.swift | 9 +- .../OutlineCatalystApp/CatalystApp.swift | 95 +++++++++++++++++++ .../ios/Outline.xcodeproj/project.pbxproj | 12 --- .../ios/Outline/Classes/AppDelegate+Outline.m | 1 + 4 files changed, 104 insertions(+), 13 deletions(-) create mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 892255cfdd..4db91dcc4a 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -9,7 +9,7 @@ let package = Package( products: [ .library( name: "OutlineAppleLib", - targets: ["Tun2socks", "OutlineSentryLogger", "OutlineTunnel", "OutlineNotification"] + targets: ["Tun2socks", "OutlineSentryLogger", "OutlineTunnel", "OutlineCatalystApp", "OutlineNotification"] ), .library( name: "PacketTunnelProvider", @@ -21,6 +21,13 @@ let package = Package( .package(url: "https://github.com/getsentry/sentry-cocoa", from: "7.31.3"), ], targets: [ + .target( + name: "OutlineCatalystApp", + dependencies: [ + .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), + "OutlineNotification", + ] + ), .target( name: "PacketTunnelProvider", dependencies: [ diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift new file mode 100644 index 0000000000..0c4504a497 --- /dev/null +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -0,0 +1,95 @@ +// Copyright 2023 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 Foundation + import OutlineNotification + import ServiceManagement + + @objc + public enum ConnectionStatus: Int { + case unknown + case connected + case disconnected + } + + extension NSObject { + @objc public func terminate() {} + @objc public func setConnectionStatus(_ status: ConnectionStatus) {} + } + + @objcMembers + public class OutlineCatalystApp: NSObject { + + public static func initApp() { + DDLog.add(DDOSLogger.sharedInstance) + + let appKitController = loadAppKitIntegrationFramework() + + // Configure the window. + let scenes = UIApplication.shared.connectedScenes + for scene in scenes { + let windowScene = (scene as! UIWindowScene) + windowScene.titlebar?.titleVisibility = .hidden + windowScene.titlebar?.toolbar = nil + windowScene.sizeRestrictions?.minimumSize = CGSizeMake(400, 550) + windowScene.sizeRestrictions?.maximumSize = CGSizeMake(400, 550) + } + + // Initiate the connection status menu in unknown state by default. + // TODO: Check status in case the the VPN is already running. + appKitController.setConnectionStatus(.unknown) + + NotificationCenter.default.addObserver(forName: NSNotification.kVpnConnected, + object: nil, + queue: nil) + { _ in + appKitController.setConnectionStatus(.connected) + } + NotificationCenter.default.addObserver(forName: NSNotification.kVpnDisconnected, + object: nil, + queue: nil) + { _ in + appKitController.setConnectionStatus(.disconnected) + } + +// // Enable app launcher to start on boot. +// appKitController.setAppLauncherEnabled(true) + } + } + + func loadAppKitIntegrationFramework() -> NSObject { + if let frameworksPath = Bundle.main.privateFrameworksPath { + let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" + do { + try Bundle(path: bundlePath)?.loadAndReturnError() + + let bundle = Bundle(path: bundlePath)! + NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") + + if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { + return appKitControllerClass.init() + } + } + catch { + NSLog("[AppKitBundleLoader] Error loading: \(error)") + } + } + preconditionFailure("[AppKitBundleLoader] Unable to load") + } + +#endif diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index 9e20513298..4c7a9d6f84 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -35,7 +35,6 @@ A2AC1A4F2B082197004E13CB /* AppKitController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2AC1A4E2B082197004E13CB /* AppKitController.swift */; }; A2AC1A9C2B082526004E13CB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A582B082526004E13CB /* Localizable.strings */; }; A2AC1A9D2B082526004E13CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A9B2B082526004E13CB /* Assets.xcassets */; }; - A2C58D172B069EE7008222FC /* CatalystApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C58D162B069EE7008222FC /* CatalystApp.swift */; }; A2C58D262B06A251008222FC /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D252B06A251008222FC /* CocoaLumberjack */; }; A2C58D282B06A251008222FC /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D272B06A251008222FC /* CocoaLumberjackSwift */; }; FC8C310B1FAA814A004262BE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC8C310A1FAA814A004262BE /* NetworkExtension.framework */; }; @@ -238,7 +237,6 @@ A2AC1A992B082526004E13CB /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Localizable.strings; sourceTree = ""; }; A2AC1A9A2B082526004E13CB /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = ""; }; A2AC1A9B2B082526004E13CB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - A2C58D162B069EE7008222FC /* CatalystApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatalystApp.swift; sourceTree = ""; }; AAFAFA54943F490EAF4CD5BC /* OutlinePlugin.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = OutlinePlugin.swift; path = "cordova-plugin-outline/OutlinePlugin.swift"; sourceTree = ""; }; EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; @@ -295,7 +293,6 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( - A2C58D152B069ECB008222FC /* CatalystApp */, A2C58D0B2B069CC8008222FC /* AppKitBridge */, 302D95EE14D2391D003F00A1 /* MainViewController.h */, 302D95EF14D2391D003F00A1 /* MainViewController.m */, @@ -470,14 +467,6 @@ path = AppKitBridge; sourceTree = ""; }; - A2C58D152B069ECB008222FC /* CatalystApp */ = { - isa = PBXGroup; - children = ( - A2C58D162B069EE7008222FC /* CatalystApp.swift */, - ); - path = CatalystApp; - sourceTree = ""; - }; A2C58D222B06A1F9008222FC /* Launcher */ = { isa = PBXGroup; children = ( @@ -801,7 +790,6 @@ files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - A2C58D172B069EE7008222FC /* CatalystApp.swift in Sources */, 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, 5F7F90AE0E924FD7B065C415 /* CDVStatusBar.m in Sources */, 2A617D29B96942E58B082FAC /* OutlinePlugin.swift in Sources */, diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m b/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m index d1d5e0715d..65c7e999b7 100644 --- a/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppDelegate+Outline.m @@ -18,6 +18,7 @@ #import "Outline-Swift.h" #if TARGET_OS_MACCATALYST +@import OutlineCatalystApp; @import ServiceManagement; #endif From 49526d1522041f91fc6e617c22ec94ffe276a0ec Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 18:25:19 -0500 Subject: [PATCH 12/19] Move NSObject extension into its own module. --- .../OutlineCatalystApp/CatalystApp.swift | 20 +++----------- .../OutlineCatalystApp/NSObject+Outline.swift | 27 +++++++++++++++++++ .../AppKitBridge/AppKitController.swift | 8 +++--- 3 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 0c4504a497..2f2ccbe13d 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -20,18 +20,6 @@ import OutlineNotification import ServiceManagement - @objc - public enum ConnectionStatus: Int { - case unknown - case connected - case disconnected - } - - extension NSObject { - @objc public func terminate() {} - @objc public func setConnectionStatus(_ status: ConnectionStatus) {} - } - @objcMembers public class OutlineCatalystApp: NSObject { @@ -52,23 +40,23 @@ // Initiate the connection status menu in unknown state by default. // TODO: Check status in case the the VPN is already running. - appKitController.setConnectionStatus(.unknown) + appKitController._AppKitBridge_setConnectionStatus(.unknown) NotificationCenter.default.addObserver(forName: NSNotification.kVpnConnected, object: nil, queue: nil) { _ in - appKitController.setConnectionStatus(.connected) + appKitController._AppKitBridge_setConnectionStatus(.connected) } NotificationCenter.default.addObserver(forName: NSNotification.kVpnDisconnected, object: nil, queue: nil) { _ in - appKitController.setConnectionStatus(.disconnected) + appKitController._AppKitBridge_setConnectionStatus(.disconnected) } // // Enable app launcher to start on boot. -// appKitController.setAppLauncherEnabled(true) +// appKitController._AppKitBridge_setAppLauncherEnabled(true) } } diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift new file mode 100644 index 0000000000..222f6e9a84 --- /dev/null +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift @@ -0,0 +1,27 @@ +// Copyright 2023 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 + +@objc +public enum ConnectionStatus: Int { + case unknown + case connected + case disconnected +} + +public extension NSObject { + @objc func _AppKitBridge_terminate() {} + @objc func _AppKitBridge_setConnectionStatus(_ status: ConnectionStatus) {} +} diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift index 2f7664461b..92b36a5290 100644 --- a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift @@ -26,12 +26,12 @@ class AppKitController: NSObject { } /// Terminates the application. - @objc public func terminate() { + @objc public func _AppKitBridge_terminate() { NSApp.terminate(self) } /// Set the connection status in the app's menu in the system-wide menu bar. - @objc public func setConnectionStatus(_ status: ConnectionStatus) { + @objc public func _AppKitBridge_setConnectionStatus(_ status: ConnectionStatus) { if statusItemController == nil { NSLog("[AppKitController] No status item controller found. Creating one now.") statusItemController = StatusItemController() @@ -40,7 +40,7 @@ class AppKitController: NSObject { } /// Enables or disables the embedded app launcher as a login item. - @objc public func setAppLauncherEnabled(_ isEnabled: Bool) { + @objc public func _AppKitBridge_setAppLauncherEnabled(_ isEnabled: Bool) { guard let launcherBundleId = getLauncherBundleId() else { return NSLog("[AppKitController] Unable to set launcher for missing bundle ID.") } @@ -53,7 +53,7 @@ class AppKitController: NSObject { } /// Loads the main application from a given launcher bundle. - @objc public func loadMainApp(_ launcherBundleId: String) { + @objc public func _AppKitBridge_loadMainApp(_ launcherBundleId: String) { // Retrieve the main app's bundle ID programmatically from the embedded launcher bundle ID. let mainAppBundleId = getMainBundleId(launcherBundleId) NSLog("[AppKitController] Loading main app \(mainAppBundleId) from launcher \(launcherBundleId).") From 5ef324ccb2d6344e7cb99cd342f3c797341f9165 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 18:47:04 -0500 Subject: [PATCH 13/19] Move the launcher back to SPM and re-add it to the main app target. --- .../apple/OutlineAppleLib/Package.swift | 12 +++ .../OutlineCatalystApp/CatalystApp.swift | 2 +- .../OutlineCatalystApp/NSObject+Outline.swift | 2 + .../Sources/OutlineLauncher/AppDelegate.swift | 64 ++++++++++++++ .../xcode/ios/Launcher/AppDelegate.swift | 87 ------------------- .../ios/Outline.xcodeproj/project.pbxproj | 63 ++++++++------ 6 files changed, 116 insertions(+), 114 deletions(-) create mode 100644 src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift delete mode 100644 src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift diff --git a/src/cordova/apple/OutlineAppleLib/Package.swift b/src/cordova/apple/OutlineAppleLib/Package.swift index 4db91dcc4a..009a081f38 100644 --- a/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/src/cordova/apple/OutlineAppleLib/Package.swift @@ -11,6 +11,10 @@ let package = Package( name: "OutlineAppleLib", targets: ["Tun2socks", "OutlineSentryLogger", "OutlineTunnel", "OutlineCatalystApp", "OutlineNotification"] ), + .library( + name: "OutlineLauncher", + targets: ["OutlineLauncher"] + ), .library( name: "PacketTunnelProvider", targets: ["PacketTunnelProvider"] @@ -21,6 +25,14 @@ let package = Package( .package(url: "https://github.com/getsentry/sentry-cocoa", from: "7.31.3"), ], targets: [ + .target( + name: "OutlineLauncher", + dependencies: [ + "CocoaLumberjack", + .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), + "OutlineCatalystApp", + ] + ), .target( name: "OutlineCatalystApp", dependencies: [ diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 2f2ccbe13d..97737f461c 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -60,7 +60,7 @@ } } - func loadAppKitIntegrationFramework() -> NSObject { + public func loadAppKitIntegrationFramework() -> NSObject { if let frameworksPath = Bundle.main.privateFrameworksPath { let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" do { diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift index 222f6e9a84..1c4015e6f3 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift @@ -24,4 +24,6 @@ public enum ConnectionStatus: Int { public extension NSObject { @objc func _AppKitBridge_terminate() {} @objc func _AppKitBridge_setConnectionStatus(_ status: ConnectionStatus) {} + @objc func _AppKitBridge_setAppLauncherEnabled(_ isEnabled: Bool) {} + @objc func _AppKitBridge_loadMainApp(_ launcherBundleId: String) {} } diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift new file mode 100644 index 0000000000..067cecbec1 --- /dev/null +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineLauncher/AppDelegate.swift @@ -0,0 +1,64 @@ +// 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/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift b/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift deleted file mode 100644 index 8aa90ed06f..0000000000 --- a/src/cordova/apple/xcode/ios/Launcher/AppDelegate.swift +++ /dev/null @@ -1,87 +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 CocoaLumberjack -import CocoaLumberjackSwift -import NetworkExtension -import UIKit - -extension NSObject { - @objc public func terminate() {} - @objc public func hello() {} -} - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - DDLog.add(DDOSLogger.sharedInstance) - - let appKitController = loadAppKitIntegrationFramework2() - appKitController.hello() - shouldLaunchMainApp { shouldLaunch in - defer { - DDLogInfo("Exiting launcher...") - appKitController.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.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) - } - } -} - -func loadAppKitIntegrationFramework2() -> NSObject { - if let frameworksPath = Bundle.main.privateFrameworksPath { - let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" - do { - try Bundle(path: bundlePath)?.loadAndReturnError() - - let bundle = Bundle(path: bundlePath)! - NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") - - if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { - return appKitControllerClass.init() - } - } - catch { - NSLog("[AppKitBundleLoader] Error loading: \(error)") - } - } - preconditionFailure("[AppKitBundleLoader] Unable to load") -} diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index 4c7a9d6f84..7a2ca7a244 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -21,9 +21,12 @@ 52E783062A5880CF00355E64 /* PacketTunnelProvider in Frameworks */ = {isa = PBXBuildFile; productRef = 52E783052A5880CF00355E64 /* PacketTunnelProvider */; }; 5F7F90AE0E924FD7B065C415 /* CDVStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 0394302BA6114B2AB648D4FF /* CDVStatusBar.m */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; - A246B7D22B0700BC00ECACD5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */; }; A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; platformFilter = maccatalyst; 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 */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A25FB7EB2B0D7772009B6B5F /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */; }; + A25FB7ED2B0D7772009B6B5F /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */; }; + A25FB7F42B0D7863009B6B5F /* OutlineLauncher in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7F32B0D7863009B6B5F /* 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 */; }; @@ -35,8 +38,6 @@ A2AC1A4F2B082197004E13CB /* AppKitController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2AC1A4E2B082197004E13CB /* AppKitController.swift */; }; A2AC1A9C2B082526004E13CB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A582B082526004E13CB /* Localizable.strings */; }; A2AC1A9D2B082526004E13CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2AC1A9B2B082526004E13CB /* Assets.xcassets */; }; - A2C58D262B06A251008222FC /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D252B06A251008222FC /* CocoaLumberjack */; }; - A2C58D282B06A251008222FC /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = A2C58D272B06A251008222FC /* CocoaLumberjackSwift */; }; FC8C310B1FAA814A004262BE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC8C310A1FAA814A004262BE /* NetworkExtension.framework */; }; FC8C310C1FAA88FB004262BE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC8C310A1FAA814A004262BE /* NetworkExtension.framework */; }; /* End PBXBuildFile section */ @@ -109,6 +110,17 @@ 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; @@ -159,7 +171,6 @@ 91E45572BB494E9299D2DD41 /* CDVClipboard.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVClipboard.m; path = "cordova-plugin-clipboard/CDVClipboard.m"; sourceTree = ""; }; 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; }; - A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppKitIntegration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A246B7DF2B07AACF00ECACD5 /* AppKitIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitIntegration.h; sourceTree = ""; }; A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OutlineLauncher.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -282,8 +293,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A2C58D262B06A251008222FC /* CocoaLumberjack in Frameworks */, - A2C58D282B06A251008222FC /* CocoaLumberjackSwift in Frameworks */, + A25FB7EB2B0D7772009B6B5F /* CocoaLumberjack in Frameworks */, + A25FB7ED2B0D7772009B6B5F /* CocoaLumberjackSwift in Frameworks */, + A25FB7F42B0D7863009B6B5F /* OutlineLauncher in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -320,7 +332,6 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( - A2C58D222B06A1F9008222FC /* Launcher */, F6D33648296CF46200AFD613 /* Packages */, 3B0347431F212E6500C8EF1F /* Outline.entitlements */, EB87FDF41871DAF40020F90C /* config.xml */, @@ -467,14 +478,6 @@ path = AppKitBridge; sourceTree = ""; }; - A2C58D222B06A1F9008222FC /* Launcher */ = { - isa = PBXGroup; - children = ( - A246B7D12B0700BC00ECACD5 /* AppDelegate.swift */, - ); - path = Launcher; - sourceTree = ""; - }; EB87FDF11871DA420020F90C /* Staging */ = { isa = PBXGroup; children = ( @@ -517,6 +520,7 @@ 3B0347571F212F0200C8EF1F /* Embed App Extensions */, A246B7E82B07AADD00ECACD5 /* Embed Frameworks */, FC0FFD6C1FCCE21E00EB0129 /* Remove unused framework architectures */, + A25FB7E82B0D75CD009B6B5F /* Copy OutlineLauncher */, ); buildRules = ( ); @@ -590,8 +594,9 @@ ); name = OutlineLauncher; packageProductDependencies = ( - A2C58D252B06A251008222FC /* CocoaLumberjack */, - A2C58D272B06A251008222FC /* CocoaLumberjackSwift */, + A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */, + A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */, + A25FB7F32B0D7863009B6B5F /* OutlineLauncher */, ); productName = OutlineLauncher; productReference = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; @@ -628,6 +633,7 @@ }; A26D262C2A1C41B1009838E0 = { CreatedOnToolsVersion = 14.3; + LastSwiftMigration = 1500; }; }; }; @@ -818,7 +824,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A246B7D22B0700BC00ECACD5 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1275,6 +1280,7 @@ 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; @@ -1334,6 +1340,7 @@ 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; @@ -1565,26 +1572,30 @@ isa = XCSwiftPackageProductDependency; productName = PacketTunnelProvider; }; - A271D4332A70829D009981B2 /* OutlineAppleLib */ = { - isa = XCSwiftPackageProductDependency; - productName = OutlineAppleLib; - }; - A27B36502B07C51500004A08 /* CocoaLumberjack */ = { + A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjack; }; - A27B36522B07C51500004A08 /* CocoaLumberjackSwift */ = { + A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjackSwift; }; - A2C58D252B06A251008222FC /* CocoaLumberjack */ = { + A25FB7F32B0D7863009B6B5F /* OutlineLauncher */ = { + isa = XCSwiftPackageProductDependency; + productName = OutlineLauncher; + }; + A271D4332A70829D009981B2 /* OutlineAppleLib */ = { + isa = XCSwiftPackageProductDependency; + productName = OutlineAppleLib; + }; + A27B36502B07C51500004A08 /* CocoaLumberjack */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjack; }; - A2C58D272B06A251008222FC /* CocoaLumberjackSwift */ = { + A27B36522B07C51500004A08 /* CocoaLumberjackSwift */ = { isa = XCSwiftPackageProductDependency; package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; productName = CocoaLumberjackSwift; From c223e1dfac310f6ea4aee68a98c3d3edb5254809 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 18:49:16 -0500 Subject: [PATCH 14/19] Enable app launcher. --- .../Sources/OutlineCatalystApp/CatalystApp.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 97737f461c..671f7b619d 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -55,8 +55,8 @@ appKitController._AppKitBridge_setConnectionStatus(.disconnected) } -// // Enable app launcher to start on boot. -// appKitController._AppKitBridge_setAppLauncherEnabled(true) + // Enable app launcher to start on boot. + appKitController._AppKitBridge_setAppLauncherEnabled(true) } } @@ -67,17 +67,17 @@ try Bundle(path: bundlePath)?.loadAndReturnError() let bundle = Bundle(path: bundlePath)! - NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") + NSLog("[CatalystApp] AppKit bundle loaded successfully") if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { return appKitControllerClass.init() } } catch { - NSLog("[AppKitBundleLoader] Error loading: \(error)") + NSLog("[CatalystApp] Error loading: \(error)") } } - preconditionFailure("[AppKitBundleLoader] Unable to load") + preconditionFailure("[CatalystApp] Unable to load") } #endif From 66b5fd393088401485341c78699c9e9c2de1a1cd Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 20:12:01 -0500 Subject: [PATCH 15/19] Reset package to minimize diff. --- package-lock.json | 88 +++++++++++++++-------------------------------- package.json | 4 +-- 2 files changed, 30 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6de24642be..6c79a084d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -115,7 +115,7 @@ "outline-i18n": "Jigsaw-Code/outline-i18n#v0.0.7", "postcss": "^7.0.39", "postcss-rtl": "^1.7.3", - "prettier": "^2.8.0", + "prettier": "2.8", "pretty-quick": "^2.0.1", "puppeteer": "^13.1.2", "replace-in-file": "^6.3.5", @@ -10164,9 +10164,9 @@ } }, "node_modules/cordova-ios/node_modules/nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.1.0.tgz", + "integrity": "sha512-ZFPLe9Iu0tnx7oWhFxAo4s7QTn8+NNDDxYNaKLjE7Dp0tbakQ3M1QhQzsnzXHQBTUO3K9BmwaxnyO8Ayn2I95Q==", "dev": true, "dependencies": { "abbrev": "^2.0.0" @@ -10179,9 +10179,9 @@ } }, "node_modules/cordova-ios/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -10194,9 +10194,9 @@ } }, "node_modules/cordova-ios/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", "dev": true, "dependencies": { "isexe": "^2.0.0" @@ -15310,9 +15310,8 @@ }, "node_modules/ios-sim": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", - "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", "dev": true, + "license": "MIT", "dependencies": { "bplist-parser": "^0.0.6", "nopt": "1.0.9", @@ -15328,23 +15327,18 @@ }, "node_modules/ios-sim/node_modules/bplist-parser": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", - "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ios-sim/node_modules/nopt": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", - "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==", "dev": true, + "license": "MIT", "dependencies": { "abbrev": "1" }, "bin": { "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" } }, "node_modules/ip": { @@ -22813,9 +22807,8 @@ }, "node_modules/simctl": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", - "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", "dev": true, + "license": "MIT", "dependencies": { "shelljs": "^0.8.5", "tail": "^0.4.0" @@ -22823,17 +22816,14 @@ }, "node_modules/simctl/node_modules/interpret": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/simctl/node_modules/rechoir": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { "resolve": "^1.1.6" @@ -22844,9 +22834,8 @@ }, "node_modules/simctl/node_modules/shelljs": { "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -23802,8 +23791,6 @@ }, "node_modules/tail": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", - "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==", "dev": true, "engines": { "node": ">= 0.4.0" @@ -25993,9 +25980,8 @@ }, "node_modules/xml-escape": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", - "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==", - "dev": true + "dev": true, + "license": "MIT License" }, "node_modules/xml-parse-from-string": { "version": "1.0.1", @@ -33893,27 +33879,27 @@ } }, "nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.1.0.tgz", + "integrity": "sha512-ZFPLe9Iu0tnx7oWhFxAo4s7QTn8+NNDDxYNaKLjE7Dp0tbakQ3M1QhQzsnzXHQBTUO3K9BmwaxnyO8Ayn2I95Q==", "dev": true, "requires": { "abbrev": "^2.0.0" } }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, "which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -37435,8 +37421,6 @@ }, "ios-sim": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", - "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", "dev": true, "requires": { "bplist-parser": "^0.0.6", @@ -37447,14 +37431,10 @@ "dependencies": { "bplist-parser": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", - "integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==", "dev": true }, "nopt": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", - "integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==", "dev": true, "requires": { "abbrev": "1" @@ -42710,8 +42690,6 @@ }, "simctl": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", - "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", "dev": true, "requires": { "shelljs": "^0.8.5", @@ -42720,14 +42698,10 @@ "dependencies": { "interpret": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "rechoir": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "requires": { "resolve": "^1.1.6" @@ -42735,8 +42709,6 @@ }, "shelljs": { "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, "requires": { "glob": "^7.0.0", @@ -43433,8 +43405,6 @@ }, "tail": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", - "integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA==", "dev": true }, "tapable": { @@ -44903,8 +44873,6 @@ }, "xml-escape": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", - "integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg==", "dev": true }, "xml-parse-from-string": { diff --git a/package.json b/package.json index 5835765947..7f4373057b 100644 --- a/package.json +++ b/package.json @@ -163,8 +163,8 @@ "platforms": [ "browser", "android", - "osx", - "ios" + "ios", + "osx" ] }, "workspaces": [ From 71ab9be9ced8811745bcfd9ee98895413c432a74 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 20:15:20 -0500 Subject: [PATCH 16/19] Remove unused module. --- .../Classes/CatalystApp/CatalystApp.swift | 95 ------------------- 1 file changed, 95 deletions(-) delete mode 100644 src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift b/src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift deleted file mode 100644 index 0c4504a497..0000000000 --- a/src/cordova/apple/xcode/ios/Outline/Classes/CatalystApp/CatalystApp.swift +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2023 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 Foundation - import OutlineNotification - import ServiceManagement - - @objc - public enum ConnectionStatus: Int { - case unknown - case connected - case disconnected - } - - extension NSObject { - @objc public func terminate() {} - @objc public func setConnectionStatus(_ status: ConnectionStatus) {} - } - - @objcMembers - public class OutlineCatalystApp: NSObject { - - public static func initApp() { - DDLog.add(DDOSLogger.sharedInstance) - - let appKitController = loadAppKitIntegrationFramework() - - // Configure the window. - let scenes = UIApplication.shared.connectedScenes - for scene in scenes { - let windowScene = (scene as! UIWindowScene) - windowScene.titlebar?.titleVisibility = .hidden - windowScene.titlebar?.toolbar = nil - windowScene.sizeRestrictions?.minimumSize = CGSizeMake(400, 550) - windowScene.sizeRestrictions?.maximumSize = CGSizeMake(400, 550) - } - - // Initiate the connection status menu in unknown state by default. - // TODO: Check status in case the the VPN is already running. - appKitController.setConnectionStatus(.unknown) - - NotificationCenter.default.addObserver(forName: NSNotification.kVpnConnected, - object: nil, - queue: nil) - { _ in - appKitController.setConnectionStatus(.connected) - } - NotificationCenter.default.addObserver(forName: NSNotification.kVpnDisconnected, - object: nil, - queue: nil) - { _ in - appKitController.setConnectionStatus(.disconnected) - } - -// // Enable app launcher to start on boot. -// appKitController.setAppLauncherEnabled(true) - } - } - - func loadAppKitIntegrationFramework() -> NSObject { - if let frameworksPath = Bundle.main.privateFrameworksPath { - let bundlePath = "\(frameworksPath)/AppKitIntegration.framework" - do { - try Bundle(path: bundlePath)?.loadAndReturnError() - - let bundle = Bundle(path: bundlePath)! - NSLog("[AppKitBundleLoader] AppKit bundle loaded successfully") - - if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { - return appKitControllerClass.init() - } - } - catch { - NSLog("[AppKitBundleLoader] Error loading: \(error)") - } - } - preconditionFailure("[AppKitBundleLoader] Unable to load") - } - -#endif From 7fa461a9d338bbc822eb7a753babd90703e0a16b Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 23:05:48 -0500 Subject: [PATCH 17/19] Fix project. --- .../ios/Outline.xcodeproj/project.pbxproj | 127 +++++------------- 1 file changed, 34 insertions(+), 93 deletions(-) diff --git a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index 7a2ca7a244..d2e873ee72 100755 --- a/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -23,10 +23,8 @@ 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; platformFilter = maccatalyst; 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 */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - A25FB7EB2B0D7772009B6B5F /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */; }; - A25FB7ED2B0D7772009B6B5F /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */; }; - A25FB7F42B0D7863009B6B5F /* OutlineLauncher in Frameworks */ = {isa = PBXBuildFile; platformFilter = maccatalyst; productRef = A25FB7F32B0D7863009B6B5F /* OutlineLauncher */; }; + 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 */; }; @@ -85,6 +83,13 @@ remoteGlobalIDString = A246B7DC2B07AACF00ECACD5; remoteInfo = AppKitIntegration; }; + A2A3EE0D2B0DB62000F8E544 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = A26D262C2A1C41B1009838E0; + remoteInfo = OutlineLauncher; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -172,10 +177,8 @@ 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; }; - A246B7DF2B07AACF00ECACD5 /* AppKitIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitIntegration.h; sourceTree = ""; }; 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 = ""; }; - A2702E892B055C8C00BB0E9C /* AppKitBridgeInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitBridgeInterface.h; 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 = ""; }; @@ -282,20 +285,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A246B7DA2B07AACF00ECACD5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; A26D262A2A1C41B1009838E0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A25FB7EB2B0D7772009B6B5F /* CocoaLumberjack in Frameworks */, - A25FB7ED2B0D7772009B6B5F /* CocoaLumberjackSwift in Frameworks */, - A25FB7F42B0D7863009B6B5F /* OutlineLauncher in Frameworks */, + A26F9C362B0D9CA000BCD3E6 /* OutlineLauncher in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -344,8 +338,6 @@ 29B97317FDCFA39411CA2CEA /* Resources */, 3B0347491F212F0200C8EF1F /* VpnExtension */, A26D262E2A1C41B1009838E0 /* OutlineLauncher */, - A2702E882B055C8C00BB0E9C /* AppKitBridgeInterface */, - A246B7DE2B07AACF00ECACD5 /* AppKitIntegration */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -426,14 +418,6 @@ path = Outline/Resources/vpn; sourceTree = ""; }; - A246B7DE2B07AACF00ECACD5 /* AppKitIntegration */ = { - isa = PBXGroup; - children = ( - A246B7DF2B07AACF00ECACD5 /* AppKitIntegration.h */, - ); - path = AppKitIntegration; - sourceTree = ""; - }; A26D262E2A1C41B1009838E0 /* OutlineLauncher */ = { isa = PBXGroup; children = ( @@ -442,14 +426,6 @@ path = OutlineLauncher; sourceTree = ""; }; - A2702E882B055C8C00BB0E9C /* AppKitBridgeInterface */ = { - isa = PBXGroup; - children = ( - A2702E892B055C8C00BB0E9C /* AppKitBridgeInterface.h */, - ); - path = AppKitBridgeInterface; - sourceTree = ""; - }; A2AC1A562B082526004E13CB /* Resources */ = { isa = PBXGroup; children = ( @@ -517,14 +493,15 @@ 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, + A25FB7E82B0D75CD009B6B5F /* Copy OutlineLauncher */, 3B0347571F212F0200C8EF1F /* Embed App Extensions */, A246B7E82B07AADD00ECACD5 /* Embed Frameworks */, FC0FFD6C1FCCE21E00EB0129 /* Remove unused framework architectures */, - A25FB7E82B0D75CD009B6B5F /* Copy OutlineLauncher */, ); buildRules = ( ); dependencies = ( + A2A3EE0E2B0DB62000F8E544 /* PBXTargetDependency */, 301BF551109A68C00062928A /* PBXTargetDependency */, 3B0347521F212F0200C8EF1F /* PBXTargetDependency */, A246B7E72B07AADD00ECACD5 /* PBXTargetDependency */, @@ -565,7 +542,6 @@ buildPhases = ( A272490C2B0D20200018A598 /* Headers */, A246B7D92B07AACF00ECACD5 /* Sources */, - A246B7DA2B07AACF00ECACD5 /* Frameworks */, A246B7DB2B07AACF00ECACD5 /* Resources */, ); buildRules = ( @@ -583,9 +559,9 @@ isa = PBXNativeTarget; buildConfigurationList = A26D26392A1C41B4009838E0 /* Build configuration list for PBXNativeTarget "OutlineLauncher" */; buildPhases = ( - A27B364E2B07C3F400004A08 /* Embed Frameworks */, A25EB8812A8437D700B92EE0 /* Sources */, A26D262A2A1C41B1009838E0 /* Frameworks */, + A27B364E2B07C3F400004A08 /* Embed Frameworks */, ); buildRules = ( ); @@ -594,9 +570,7 @@ ); name = OutlineLauncher; packageProductDependencies = ( - A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */, - A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */, - A25FB7F32B0D7863009B6B5F /* OutlineLauncher */, + A26F9C352B0D9CA000BCD3E6 /* OutlineLauncher */, ); productName = OutlineLauncher; productReference = A26D262D2A1C41B1009838E0 /* OutlineLauncher.app */; @@ -852,6 +826,12 @@ target = A246B7DC2B07AACF00ECACD5 /* AppKitIntegration */; targetProxy = A246B7FD2B07B25C00ECACD5 /* PBXContainerItemProxy */; }; + A2A3EE0E2B0DB62000F8E544 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + platformFilter = maccatalyst; + target = A26D262C2A1C41B1009838E0 /* OutlineLauncher */; + targetProxy = A2A3EE0D2B0DB62000F8E544 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -935,7 +915,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -960,13 +939,6 @@ GCC_PREFIX_HEADER = "Outline/Outline-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - "$(OBJROOT)/**", - ); INFOPLIST_FILE = "Outline/Outline-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -991,7 +963,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -1015,13 +986,6 @@ GCC_PREFIX_HEADER = "Outline/Outline-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - "$(OBJROOT)/**", - ); INFOPLIST_FILE = "Outline/Outline-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -1153,6 +1117,7 @@ }; A246B7E22B07AACF00ECACD5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; @@ -1195,7 +1160,7 @@ "@loader_path/Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; @@ -1217,6 +1182,7 @@ }; A246B7E32B07AACF00ECACD5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; @@ -1255,7 +1221,7 @@ "@loader_path/Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 11.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; @@ -1275,6 +1241,7 @@ }; A26D263A2A1C41B4009838E0 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -1313,7 +1280,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1329,12 +1296,13 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 2; }; name = Debug; }; A26D263B2A1C41B4009838E0 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -1364,11 +1332,12 @@ INFOPLIST_KEY_LSApplicationCategoryType = ""; INFOPLIST_KEY_LSBackgroundOnly = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -1383,7 +1352,7 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 2; }; name = Release; }; @@ -1412,7 +1381,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; @@ -1423,16 +1391,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - "\"$(OBJROOT)\"", - "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include", - ); IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 13.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SKIP_INSTALL = NO; @@ -1465,7 +1425,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; @@ -1476,16 +1435,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - "\"$(OBJROOT)\"", - "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include", - ); IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 13.3; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; SDKROOT = iphoneos; SKIP_INSTALL = NO; SWIFT_COMPILATION_MODE = wholemodule; @@ -1572,17 +1523,7 @@ isa = XCSwiftPackageProductDependency; productName = PacketTunnelProvider; }; - A25FB7EA2B0D7772009B6B5F /* CocoaLumberjack */ = { - isa = XCSwiftPackageProductDependency; - package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; - productName = CocoaLumberjack; - }; - A25FB7EC2B0D7772009B6B5F /* CocoaLumberjackSwift */ = { - isa = XCSwiftPackageProductDependency; - package = 52CBB890295BD8F200D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */; - productName = CocoaLumberjackSwift; - }; - A25FB7F32B0D7863009B6B5F /* OutlineLauncher */ = { + A26F9C352B0D9CA000BCD3E6 /* OutlineLauncher */ = { isa = XCSwiftPackageProductDependency; productName = OutlineLauncher; }; From 96b33c4a3cbb6db78eefa12e97f042cdf97c80d1 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Tue, 21 Nov 2023 23:12:44 -0500 Subject: [PATCH 18/19] Update logging. --- .../Sources/OutlineCatalystApp/CatalystApp.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 671f7b619d..65414e6840 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -67,14 +67,14 @@ try Bundle(path: bundlePath)?.loadAndReturnError() let bundle = Bundle(path: bundlePath)! - NSLog("[CatalystApp] AppKit bundle loaded successfully") + DDLogInfo("[CatalystApp] AppKit bundle loaded successfully") if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { return appKitControllerClass.init() } } catch { - NSLog("[CatalystApp] Error loading: \(error)") + DDLogInfo("[CatalystApp] Error loading: \(error)") } } preconditionFailure("[CatalystApp] Unable to load") From 72414f759f4910d9f6c9f6f59d08c7905b110f85 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Wed, 22 Nov 2023 10:38:42 -0500 Subject: [PATCH 19/19] Run `SwiftFormat` over the changed files. --- .../Sources/OutlineCatalystApp/CatalystApp.swift | 8 +++----- .../OutlineCatalystApp/NSObject+Outline.swift | 6 +++--- .../Classes/AppKitBridge/AppKitController.swift | 1 - .../Classes/AppKitBridge/StatusItemController.swift | 12 ++++++++---- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift index 65414e6840..63b7d78c8c 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/CatalystApp.swift @@ -22,7 +22,6 @@ @objcMembers public class OutlineCatalystApp: NSObject { - public static func initApp() { DDLog.add(DDOSLogger.sharedInstance) @@ -55,8 +54,8 @@ appKitController._AppKitBridge_setConnectionStatus(.disconnected) } - // Enable app launcher to start on boot. - appKitController._AppKitBridge_setAppLauncherEnabled(true) + // Enable app launcher to start on boot. + appKitController._AppKitBridge_setAppLauncherEnabled(true) } } @@ -72,8 +71,7 @@ if let appKitControllerClass = bundle.classNamed("AppKitIntegration.AppKitController") as? NSObject.Type { return appKitControllerClass.init() } - } - catch { + } catch { DDLogInfo("[CatalystApp] Error loading: \(error)") } } diff --git a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift index 1c4015e6f3..4e22efa63f 100644 --- a/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift +++ b/src/cordova/apple/OutlineAppleLib/Sources/OutlineCatalystApp/NSObject+Outline.swift @@ -23,7 +23,7 @@ public enum ConnectionStatus: Int { public extension NSObject { @objc func _AppKitBridge_terminate() {} - @objc func _AppKitBridge_setConnectionStatus(_ status: ConnectionStatus) {} - @objc func _AppKitBridge_setAppLauncherEnabled(_ isEnabled: Bool) {} - @objc func _AppKitBridge_loadMainApp(_ launcherBundleId: String) {} + @objc func _AppKitBridge_setConnectionStatus(_: ConnectionStatus) {} + @objc func _AppKitBridge_setAppLauncherEnabled(_: Bool) {} + @objc func _AppKitBridge_loadMainApp(_: String) {} } diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift index 92b36a5290..0ee4988a27 100644 --- a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/AppKitController.swift @@ -15,7 +15,6 @@ import AppKit import ServiceManagement - class AppKitController: NSObject { private var statusItemController: StatusItemController? static let kAppGroup = "QT8Z3Q9V3A.org.outline.macos.client" diff --git a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift index 1a7fd7fe1a..995228d1db 100644 --- a/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift +++ b/src/cordova/apple/xcode/ios/Outline/Classes/AppKitBridge/StatusItemController.swift @@ -37,19 +37,23 @@ class StatusItemController: NSObject { static let open = NSLocalizedString( "tray_open_window", bundle: Bundle(for: StatusItemController.self), - comment: "Tray menu entry to show the application window.") + comment: "Tray menu entry to show the application window." + ) static let quit = NSLocalizedString( "quit", bundle: Bundle(for: StatusItemController.self), - comment: "Tray menu entry to quit the application.") + comment: "Tray menu entry to quit the application." + ) static let statusConnected = NSLocalizedString( "connected_server_state", bundle: Bundle(for: StatusItemController.self), - comment: "Tray menu entry indicating a server is currently connected and in use.") + comment: "Tray menu entry indicating a server is currently connected and in use." + ) static let statusDisconnected = NSLocalizedString( "disconnected_server_state", bundle: Bundle(for: StatusItemController.self), - comment: "Tray menu entry indicating no server is currently connected.") + comment: "Tray menu entry indicating no server is currently connected." + ) } override init() {