From 2377dc6cb63be48bc6aef825110e35e8a86bb9ec Mon Sep 17 00:00:00 2001 From: linhey Date: Thu, 12 Sep 2024 15:39:32 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=9C=A8=20SwiftUI=20Previews=20?= =?UTF-8?q?=E4=B8=8D=E5=90=AF=E7=94=A8=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Main/Server/Connection/LKS_ConnectionManager.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Src/Main/Server/Connection/LKS_ConnectionManager.m b/Src/Main/Server/Connection/LKS_ConnectionManager.m index c1ec8fc..0a1068d 100644 --- a/Src/Main/Server/Connection/LKS_ConnectionManager.m +++ b/Src/Main/Server/Connection/LKS_ConnectionManager.m @@ -1,4 +1,4 @@ -#ifdef SHOULD_COMPILE_LOOKIN_SERVER +#ifdef SHOULD_COMPILE_LOOKIN_SERVER // // LookinServer.m @@ -39,8 +39,12 @@ + (instancetype)sharedInstance { } + (void)load { - // 触发 init 方法 - [LKS_ConnectionManager sharedInstance]; + if (NSProcessInfo.processInfo.environment[@"XCODE_RUNNING_FOR_PREVIEWS"]) { + + } else { + // 触发 init 方法 + [LKS_ConnectionManager sharedInstance]; + } } - (instancetype)init {