From 85f7bf76aab0855c651bef9cf9b353b63ffe9aa3 Mon Sep 17 00:00:00 2001 From: Muukii Date: Tue, 8 Apr 2025 13:48:08 +0900 Subject: [PATCH] Patch --- Source/ASConfigurationInternal.mm | 2 +- Source/ASInternalHelpers.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/ASConfigurationInternal.mm b/Source/ASConfigurationInternal.mm index 993802d66..bdd0d8e97 100644 --- a/Source/ASConfigurationInternal.mm +++ b/Source/ASConfigurationInternal.mm @@ -51,7 +51,7 @@ - (instancetype)init - (void)frameworkDidInitialize { - ASDisplayNodeAssertMainThread(); +// ASDisplayNodeAssertMainThread(); /* a obstacle to run SwiftUI Preview */ if (_frameworkInitialized) { ASDisplayNodeFailAssert(@"Framework initialized twice."); return; diff --git a/Source/ASInternalHelpers.mm b/Source/ASInternalHelpers.mm index 15fb42811..d5cbbb821 100644 --- a/Source/ASInternalHelpers.mm +++ b/Source/ASInternalHelpers.mm @@ -65,7 +65,7 @@ void ASInitializeFrameworkMainThreadOnConstructor(void) { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - ASDisplayNodeCAssertMainThread(); +// ASDisplayNodeCAssertMainThread(); /* a obstacle to run SwiftUI Preview */ ASNotifyInitialized(); #if AS_SIGNPOST_ENABLE _ASInitializeSignpostObservers(); @@ -77,7 +77,7 @@ void ASInitializeFrameworkMainThreadOnDestructor(void) { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - ASDisplayNodeCAssertMainThread(); +// ASDisplayNodeCAssertMainThread(); /* a obstacle to run SwiftUI Preview */ // Ensure these values are cached on the main thread before needed in the background. if (ASActivateExperimentalFeature(ASExperimentalLayerDefaults)) { // Nop. We will gather default values on-demand in ASDefaultAllowsGroupOpacity and ASDefaultAllowsEdgeAntialiasing