ソースを参照

Modify FinderSyncExt to move components into shared Framework that can be used in FileProviderExt

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Claudio Cambra 3 年 前
コミット
f20b11745d

+ 4 - 3
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.h

@@ -15,9 +15,10 @@
 
 #import <Cocoa/Cocoa.h>
 #import <FinderSync/FinderSync.h>
+#import <NCDesktopClientSocketKit/LocalSocketClient.h>
+
 #import "SyncClient.h"
-#import "LineProcessor.h"
-#import "LocalSocketClient.h"
+#import "FinderSyncSocketLineProcessor.h"
 
 @interface FinderSync : FIFinderSync <SyncClientDelegate>
 {
@@ -28,7 +29,7 @@
     NSCondition *_menuIsComplete;
 }
 
-@property LineProcessor *lineProcessor;
+@property FinderSyncSocketLineProcessor *lineProcessor;
 @property LocalSocketClient *localSocketClient;
 
 @end

+ 1 - 1
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m

@@ -62,7 +62,7 @@
         NSLog(@"Socket path: %@", socketPath.path);
 
         if (socketPath.path) {
-            self.lineProcessor = [[LineProcessor alloc] initWithDelegate:self];
+            self.lineProcessor = [[FinderSyncSocketLineProcessor alloc] initWithDelegate:self];
             self.localSocketClient = [[LocalSocketClient alloc] initWithSocketPath:socketPath.path
                                                                      lineProcessor:self.lineProcessor];
             [self.localSocketClient start];

+ 8 - 6
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/LineProcessor.h → shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSyncSocketLineProcessor.h

@@ -12,22 +12,24 @@
  * for more details.
  */
 
+#import <NCDesktopClientSocketKit/LineProcessor.h>
+
 #import "SyncClient.h"
 
-#ifndef LineProcessor_h
-#define LineProcessor_h
+#ifndef FinderSyncSocketLineProcessor_h
+#define FinderSyncSocketLineProcessor_h
 
 /// This class is in charge of dispatching all work that must be done on the UI side of the extension.
 /// Tasks are dispatched on the main UI thread for this reason.
 ///
-/// These tasks are parsed from byte data (UTF9 strings) acquired from the socket; look at the
+/// These tasks are parsed from byte data (UTF8 strings) acquired from the socket; look at the
 /// LocalSocketClient for more detail on how data is read from and written to the socket.
 
-@interface LineProcessor : NSObject
-@property(nonatomic, weak)id<SyncClientDelegate> delegate;
+@interface FinderSyncSocketLineProcessor : NSObject<LineProcessor>
+
+@property(nonatomic, weak) id<SyncClientDelegate> delegate;
 
 - (instancetype)initWithDelegate:(id<SyncClientDelegate>)delegate;
-- (void)process:(NSString*)line;
 
 @end
 #endif /* LineProcessor_h */

+ 2 - 2
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/LineProcessor.m → shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSyncSocketLineProcessor.m

@@ -13,9 +13,9 @@
  */
 
 #import <Foundation/Foundation.h>
-#import "LineProcessor.h"
+#import "FinderSyncSocketLineProcessor.h"
 
-@implementation LineProcessor
+@implementation FinderSyncSocketLineProcessor
 
 -(instancetype)initWithDelegate:(id<SyncClientDelegate>)delegate
 {

+ 24 - 0
shell_integration/MacOSX/NextcloudIntegration/NCDesktopClientSocketKit/LineProcessor.h

@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef LineProcessor_h
+#define LineProcessor_h
+
+@protocol LineProcessor<NSObject>
+
+- (void)process:(NSString*)line;
+
+@end
+
+#endif /* LineProcessor_h */

+ 2 - 2
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/LocalSocketClient.h → shell_integration/MacOSX/NextcloudIntegration/NCDesktopClientSocketKit/LocalSocketClient.h

@@ -12,7 +12,7 @@
  * for more details.
  */
 
-#import "LineProcessor.h"
+#import <NCDesktopClientSocketKit/LineProcessor.h>
 
 #ifndef LocalSocketClient_h
 #define LocalSocketClient_h
@@ -38,7 +38,7 @@
 @interface LocalSocketClient : NSObject
 
 - (instancetype)initWithSocketPath:(NSString*)socketPath
-                     lineProcessor:(LineProcessor*)lineProcessor;
+                     lineProcessor:(id<LineProcessor>)lineProcessor;
 - (BOOL)isConnected;
 - (void)start;
 - (void)restart;

+ 3 - 2
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/LocalSocketClient.m → shell_integration/MacOSX/NextcloudIntegration/NCDesktopClientSocketKit/LocalSocketClient.m

@@ -24,7 +24,7 @@
 @interface LocalSocketClient()
 {
     NSString* _socketPath;
-    LineProcessor* _lineProcessor;
+    id<LineProcessor> _lineProcessor;
 
     int _sock;
     dispatch_queue_t _localSocketQueue;
@@ -37,7 +37,8 @@
 
 @implementation LocalSocketClient
 
-- (instancetype)initWithSocketPath:(NSString*)socketPath lineProcessor:(LineProcessor*)lineProcessor
+- (instancetype)initWithSocketPath:(NSString*)socketPath
+                     lineProcessor:(id<LineProcessor>)lineProcessor
 {
     NSLog(@"Initiating local socket client.");
     self = [super init];

+ 19 - 0
shell_integration/MacOSX/NextcloudIntegration/NCDesktopClientSocketKit/NCDesktopClientSocketKit.h

@@ -0,0 +1,19 @@
+//
+//  NCDesktopClientSocketKit.h
+//  NCDesktopClientSocketKit
+//
+//  Created by Claudio Cambra on 23/12/22.
+//
+
+#import <Foundation/Foundation.h>
+
+//! Project version number for NCDesktopClientSocketKit.
+FOUNDATION_EXPORT double NCDesktopClientSocketKitVersionNumber;
+
+//! Project version string for NCDesktopClientSocketKit.
+FOUNDATION_EXPORT const unsigned char NCDesktopClientSocketKitVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <NCDesktopClientSocketKit/PublicHeader.h>
+
+#import <NCDesktopClientSocketKit/LocalSocketClient.h>
+#import <NCDesktopClientSocketKit/LineProcessor.h>

+ 297 - 13
shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.pbxproj

@@ -12,8 +12,17 @@
 		538E396F27F4765000FA63D5 /* FileProviderItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 538E396E27F4765000FA63D5 /* FileProviderItem.swift */; };
 		538E397127F4765000FA63D5 /* FileProviderEnumerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 538E397027F4765000FA63D5 /* FileProviderEnumerator.swift */; };
 		538E397627F4765000FA63D5 /* FileProviderExt.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 538E396727F4765000FA63D5 /* FileProviderExt.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
-		539158AC27BE71A900816F56 /* LineProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 539158AB27BE71A900816F56 /* LineProcessor.m */; };
-		539158B327BEC98A00816F56 /* LocalSocketClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 539158B227BEC98A00816F56 /* LocalSocketClient.m */; };
+		53903D1E2956164F00D0B308 /* NCDesktopClientSocketKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 53903D0E2956164F00D0B308 /* NCDesktopClientSocketKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		53903D212956164F00D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; };
+		53903D222956164F00D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		53903D2A295616F000D0B308 /* LocalSocketClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 539158B227BEC98A00816F56 /* LocalSocketClient.m */; };
+		53903D2B2956173000D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; };
+		53903D2C2956173000D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		53903D302956173F00D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; };
+		53903D312956173F00D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		53903D352956184400D0B308 /* LocalSocketClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 539158B127BE891500816F56 /* LocalSocketClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		53903D37295618A400D0B308 /* LineProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 53903D36295618A400D0B308 /* LineProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		539158AC27BE71A900816F56 /* FinderSyncSocketLineProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 539158AB27BE71A900816F56 /* FinderSyncSocketLineProcessor.m */; };
 		C2B573BA1B1CD91E00303B36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573B91B1CD91E00303B36 /* main.m */; };
 		C2B573D21B1CD94B00303B36 /* main.m in Resources */ = {isa = PBXBuildFile; fileRef = C2B573B91B1CD91E00303B36 /* main.m */; };
 		C2B573DE1B1CD9CE00303B36 /* FinderSync.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573DD1B1CD9CE00303B36 /* FinderSync.m */; };
@@ -33,6 +42,27 @@
 			remoteGlobalIDString = 538E396627F4765000FA63D5;
 			remoteInfo = FileProviderExt;
 		};
+		53903D1F2956164F00D0B308 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = C2B573951B1CD88000303B36 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 53903D0B2956164F00D0B308;
+			remoteInfo = NCDesktopClientSocketKit;
+		};
+		53903D2D2956173000D0B308 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = C2B573951B1CD88000303B36 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 53903D0B2956164F00D0B308;
+			remoteInfo = NCDesktopClientSocketKit;
+		};
+		53903D322956173F00D0B308 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = C2B573951B1CD88000303B36 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 53903D0B2956164F00D0B308;
+			remoteInfo = NCDesktopClientSocketKit;
+		};
 		C2B573DF1B1CD9CE00303B36 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = C2B573951B1CD88000303B36 /* Project object */;
@@ -43,6 +73,39 @@
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
+		53903D232956165000D0B308 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				53903D222956164F00D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */,
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		53903D2F2956173000D0B308 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				53903D2C2956173000D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */,
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		53903D342956173F00D0B308 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				53903D312956173F00D0B308 /* NCDesktopClientSocketKit.framework in Embed Frameworks */,
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		C2B573E11B1CD9CE00303B36 /* Embed App Extensions */ = {
 			isa = PBXCopyFilesBuildPhase;
 			buildActionMask = 8;
@@ -65,9 +128,12 @@
 		538E397027F4765000FA63D5 /* FileProviderEnumerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProviderEnumerator.swift; sourceTree = "<group>"; };
 		538E397227F4765000FA63D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		538E397327F4765000FA63D5 /* FileProviderExt.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FileProviderExt.entitlements; sourceTree = "<group>"; };
-		539158A927BE606500816F56 /* LineProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LineProcessor.h; sourceTree = "<group>"; };
+		53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NCDesktopClientSocketKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		53903D0E2956164F00D0B308 /* NCDesktopClientSocketKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NCDesktopClientSocketKit.h; sourceTree = "<group>"; };
+		53903D36295618A400D0B308 /* LineProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LineProcessor.h; sourceTree = "<group>"; };
+		539158A927BE606500816F56 /* FinderSyncSocketLineProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FinderSyncSocketLineProcessor.h; sourceTree = "<group>"; };
 		539158AA27BE67CC00816F56 /* SyncClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyncClient.h; sourceTree = "<group>"; };
-		539158AB27BE71A900816F56 /* LineProcessor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LineProcessor.m; sourceTree = "<group>"; };
+		539158AB27BE71A900816F56 /* FinderSyncSocketLineProcessor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FinderSyncSocketLineProcessor.m; sourceTree = "<group>"; };
 		539158B127BE891500816F56 /* LocalSocketClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalSocketClient.h; sourceTree = "<group>"; };
 		539158B227BEC98A00816F56 /* LocalSocketClient.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocalSocketClient.m; sourceTree = "<group>"; };
 		C2B573B11B1CD91E00303B36 /* desktopclient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = desktopclient.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -91,6 +157,14 @@
 			buildActionMask = 2147483647;
 			files = (
 				538E396A27F4765000FA63D5 /* UniformTypeIdentifiers.framework in Frameworks */,
+				53903D302956173F00D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		53903D092956164F00D0B308 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -98,6 +172,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				53903D212956164F00D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -105,6 +180,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				53903D2B2956173000D0B308 /* NCDesktopClientSocketKit.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -131,12 +207,24 @@
 			path = FileProviderExt;
 			sourceTree = "<group>";
 		};
+		53903D0D2956164F00D0B308 /* NCDesktopClientSocketKit */ = {
+			isa = PBXGroup;
+			children = (
+				53903D0E2956164F00D0B308 /* NCDesktopClientSocketKit.h */,
+				539158B127BE891500816F56 /* LocalSocketClient.h */,
+				539158B227BEC98A00816F56 /* LocalSocketClient.m */,
+				53903D36295618A400D0B308 /* LineProcessor.h */,
+			);
+			path = NCDesktopClientSocketKit;
+			sourceTree = "<group>";
+		};
 		C2B573941B1CD88000303B36 = {
 			isa = PBXGroup;
 			children = (
 				C2B573B31B1CD91E00303B36 /* desktopclient */,
 				C2B573D81B1CD9CE00303B36 /* FinderSyncExt */,
 				538E396B27F4765000FA63D5 /* FileProviderExt */,
+				53903D0D2956164F00D0B308 /* NCDesktopClientSocketKit */,
 				538E396827F4765000FA63D5 /* Frameworks */,
 				C2B573B21B1CD91E00303B36 /* Products */,
 			);
@@ -148,6 +236,7 @@
 				C2B573B11B1CD91E00303B36 /* desktopclient.app */,
 				C2B573D71B1CD9CE00303B36 /* FinderSyncExt.appex */,
 				538E396727F4765000FA63D5 /* FileProviderExt.appex */,
+				53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -175,10 +264,8 @@
 				539158AA27BE67CC00816F56 /* SyncClient.h */,
 				C2B573DC1B1CD9CE00303B36 /* FinderSync.h */,
 				C2B573DD1B1CD9CE00303B36 /* FinderSync.m */,
-				539158A927BE606500816F56 /* LineProcessor.h */,
-				539158AB27BE71A900816F56 /* LineProcessor.m */,
-				539158B127BE891500816F56 /* LocalSocketClient.h */,
-				539158B227BEC98A00816F56 /* LocalSocketClient.m */,
+				539158A927BE606500816F56 /* FinderSyncSocketLineProcessor.h */,
+				539158AB27BE71A900816F56 /* FinderSyncSocketLineProcessor.m */,
 				C2B573D91B1CD9CE00303B36 /* Supporting Files */,
 			);
 			path = FinderSyncExt;
@@ -200,6 +287,19 @@
 		};
 /* End PBXGroup section */
 
+/* Begin PBXHeadersBuildPhase section */
+		53903D072956164F00D0B308 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				53903D352956184400D0B308 /* LocalSocketClient.h in Headers */,
+				53903D37295618A400D0B308 /* LineProcessor.h in Headers */,
+				53903D1E2956164F00D0B308 /* NCDesktopClientSocketKit.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
 /* Begin PBXNativeTarget section */
 		538E396627F4765000FA63D5 /* FileProviderExt */ = {
 			isa = PBXNativeTarget;
@@ -208,10 +308,12 @@
 				538E396327F4765000FA63D5 /* Sources */,
 				538E396427F4765000FA63D5 /* Frameworks */,
 				538E396527F4765000FA63D5 /* Resources */,
+				53903D342956173F00D0B308 /* Embed Frameworks */,
 			);
 			buildRules = (
 			);
 			dependencies = (
+				53903D332956173F00D0B308 /* PBXTargetDependency */,
 			);
 			name = FileProviderExt;
 			packageProductDependencies = (
@@ -220,6 +322,24 @@
 			productReference = 538E396727F4765000FA63D5 /* FileProviderExt.appex */;
 			productType = "com.apple.product-type.app-extension";
 		};
+		53903D0B2956164F00D0B308 /* NCDesktopClientSocketKit */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 53903D282956165000D0B308 /* Build configuration list for PBXNativeTarget "NCDesktopClientSocketKit" */;
+			buildPhases = (
+				53903D072956164F00D0B308 /* Headers */,
+				53903D082956164F00D0B308 /* Sources */,
+				53903D092956164F00D0B308 /* Frameworks */,
+				53903D0A2956164F00D0B308 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = NCDesktopClientSocketKit;
+			productName = NCDesktopClientSocketKit;
+			productReference = 53903D0C2956164F00D0B308 /* NCDesktopClientSocketKit.framework */;
+			productType = "com.apple.product-type.framework";
+		};
 		C2B573B01B1CD91E00303B36 /* desktopclient */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = C2B573CC1B1CD91E00303B36 /* Build configuration list for PBXNativeTarget "desktopclient" */;
@@ -228,12 +348,14 @@
 				C2B573AE1B1CD91E00303B36 /* Frameworks */,
 				C2B573AF1B1CD91E00303B36 /* Resources */,
 				C2B573E11B1CD9CE00303B36 /* Embed App Extensions */,
+				53903D232956165000D0B308 /* Embed Frameworks */,
 			);
 			buildRules = (
 			);
 			dependencies = (
 				C2B573E01B1CD9CE00303B36 /* PBXTargetDependency */,
 				538E397527F4765000FA63D5 /* PBXTargetDependency */,
+				53903D202956164F00D0B308 /* PBXTargetDependency */,
 			);
 			name = desktopclient;
 			productName = desktopclient;
@@ -248,10 +370,12 @@
 				C2B573D41B1CD9CE00303B36 /* Frameworks */,
 				C2B573D51B1CD9CE00303B36 /* Resources */,
 				5B3335471CA058E200E11A45 /* ShellScript */,
+				53903D2F2956173000D0B308 /* Embed Frameworks */,
 			);
 			buildRules = (
 			);
 			dependencies = (
+				53903D2E2956173000D0B308 /* PBXTargetDependency */,
 			);
 			name = FinderSyncExt;
 			productName = FinderSyncExt;
@@ -264,13 +388,17 @@
 		C2B573951B1CD88000303B36 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastSwiftUpdateCheck = 1330;
+				LastSwiftUpdateCheck = 1420;
 				LastUpgradeCheck = 1240;
 				TargetAttributes = {
 					538E396627F4765000FA63D5 = {
 						CreatedOnToolsVersion = 13.3;
 						ProvisioningStyle = Manual;
 					};
+					53903D0B2956164F00D0B308 = {
+						CreatedOnToolsVersion = 14.2;
+						ProvisioningStyle = Manual;
+					};
 					C2B573B01B1CD91E00303B36 = {
 						CreatedOnToolsVersion = 6.3.1;
 						DevelopmentTeam = 9B5WD74GWJ;
@@ -307,6 +435,7 @@
 				C2B573B01B1CD91E00303B36 /* desktopclient */,
 				C2B573D61B1CD9CE00303B36 /* FinderSyncExt */,
 				538E396627F4765000FA63D5 /* FileProviderExt */,
+				53903D0B2956164F00D0B308 /* NCDesktopClientSocketKit */,
 			);
 		};
 /* End PBXProject section */
@@ -319,6 +448,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		53903D0A2956164F00D0B308 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		C2B573AF1B1CD91E00303B36 /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -369,6 +505,14 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		53903D082956164F00D0B308 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				53903D2A295616F000D0B308 /* LocalSocketClient.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		C2B573AD1B1CD91E00303B36 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -381,8 +525,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				539158B327BEC98A00816F56 /* LocalSocketClient.m in Sources */,
-				539158AC27BE71A900816F56 /* LineProcessor.m in Sources */,
+				539158AC27BE71A900816F56 /* FinderSyncSocketLineProcessor.m in Sources */,
 				C2B573DE1B1CD9CE00303B36 /* FinderSync.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -395,6 +538,21 @@
 			target = 538E396627F4765000FA63D5 /* FileProviderExt */;
 			targetProxy = 538E397427F4765000FA63D5 /* PBXContainerItemProxy */;
 		};
+		53903D202956164F00D0B308 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 53903D0B2956164F00D0B308 /* NCDesktopClientSocketKit */;
+			targetProxy = 53903D1F2956164F00D0B308 /* PBXContainerItemProxy */;
+		};
+		53903D2E2956173000D0B308 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 53903D0B2956164F00D0B308 /* NCDesktopClientSocketKit */;
+			targetProxy = 53903D2D2956173000D0B308 /* PBXContainerItemProxy */;
+		};
+		53903D332956173F00D0B308 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 53903D0B2956164F00D0B308 /* NCDesktopClientSocketKit */;
+			targetProxy = 53903D322956173F00D0B308 /* PBXContainerItemProxy */;
+		};
 		C2B573E01B1CD9CE00303B36 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = C2B573D61B1CD9CE00303B36 /* FinderSyncExt */;
@@ -438,7 +596,7 @@
 				INFOPLIST_KEY_CFBundleDisplayName = FileProviderExt;
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 12.3;
+				MACOSX_DEPLOYMENT_TARGET = 12.0;
 				MARKETING_VERSION = 1.0;
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
@@ -485,7 +643,7 @@
 				INFOPLIST_KEY_CFBundleDisplayName = FileProviderExt;
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 12.3;
+				MACOSX_DEPLOYMENT_TARGET = 12.0;
 				MARKETING_VERSION = 1.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
@@ -500,6 +658,123 @@
 			};
 			name = Release;
 		};
+		53903D242956165000D0B308 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				APPLICATION_EXTENSION_API_ONLY = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_IDENTITY = "-";
+				CODE_SIGN_STYLE = Manual;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = "";
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 16.2;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks @loader_path/Frameworks";
+				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks @loader_path/Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MARKETING_VERSION = 1.0;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = com.owncloud.NCDesktopClientSocketKit;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
+				SDKROOT = auto;
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = macosx;
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Debug;
+		};
+		53903D252956165000D0B308 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				APPLICATION_EXTENSION_API_ONLY = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_IDENTITY = "-";
+				CODE_SIGN_STYLE = Manual;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = "";
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				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_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 16.2;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks @loader_path/Frameworks";
+				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks @loader_path/Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MARKETING_VERSION = 1.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = com.owncloud.NCDesktopClientSocketKit;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
+				SDKROOT = auto;
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = macosx;
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Release;
+		};
 		C2B573991B1CD88000303B36 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -781,6 +1056,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		53903D282956165000D0B308 /* Build configuration list for PBXNativeTarget "NCDesktopClientSocketKit" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				53903D242956165000D0B308 /* Debug */,
+				53903D252956165000D0B308 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 		C2B573981B1CD88000303B36 /* Build configuration list for PBXProject "NextcloudIntegration" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (

+ 11 - 0
shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/xcshareddata/xcschemes/FinderSyncExt.xcscheme

@@ -52,6 +52,17 @@
          </BuildableReference>
       </MacroExpansion>
       <Testables>
+         <TestableReference
+            skipped = "NO"
+            parallelizable = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "53903D142956164F00D0B308"
+               BuildableName = "NCDesktopClientSocketKitTests.xctest"
+               BlueprintName = "NCDesktopClientSocketKitTests"
+               ReferencedContainer = "container:NextcloudIntegration.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
    </TestAction>
    <LaunchAction