From 9e6fa2f4964cd9aec3a15230d633191e7ca18fea Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Mar 2024 02:04:49 +0800 Subject: [PATCH] Fix Example project build issue (#55) --- Example/Example.xcodeproj/project.pbxproj | 214 ++++++++++-------- Example/HostingExample/ViewController.swift | 12 +- Example/Package.swift | 3 +- Package.resolved | 2 +- .../CoreServices.framework/Info.plist | Bin 0 -> 240 bytes .../CoreServices.framework/Info.plist | Bin 0 -> 240 bytes Sources/COpenSwiftUI/MovableLock.c | 2 +- .../Core/Graph/Extensions/OGSubgraph.swift | 6 +- .../OpenSwiftUI/Core/Graph/GraphHost.swift | 1 - .../Integration/UIKit/UIHostingView.swift | 20 +- 10 files changed, 129 insertions(+), 131 deletions(-) create mode 100644 PrivateFrameworks/CoreServices.xcframework/ios-arm64-arm64e/CoreServices.framework/Info.plist create mode 100644 PrivateFrameworks/CoreServices.xcframework/ios-arm64-x86_64-simulator/CoreServices.framework/Info.plist diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index ba71c7d..2dec18e 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -7,11 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 27496E8A2BB1E05B00953172 /* AttributeGraph.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27496E892BB1E05B00953172 /* AttributeGraph.xcframework */; }; + 27496E8E2BB1E0AA00953172 /* CoreServices.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27496E8D2BB1E0AA00953172 /* CoreServices.xcframework */; }; 27CD0B4D2AFC8D37003665EB /* ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0B4C2AFC8D37003665EB /* ExampleApp.swift */; }; 27CD0B4F2AFC8D37003665EB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0B4E2AFC8D37003665EB /* ContentView.swift */; }; 27CD0B512AFC8D38003665EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0B502AFC8D38003665EB /* Assets.xcassets */; }; 27CD0B552AFC8D38003665EB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */; }; - 27CD0B5D2AFC8DA7003665EB /* OpenGraph in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5C2AFC8DA7003665EB /* OpenGraph */; }; 27CD0B5F2AFC8DA7003665EB /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */; }; 27D49DFB2BA604FB00F6E2E2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D49DFA2BA604FB00F6E2E2 /* AppDelegate.swift */; }; 27D49DFD2BA604FB00F6E2E2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D49DFC2BA604FB00F6E2E2 /* SceneDelegate.swift */; }; @@ -23,6 +24,10 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 271D81642BB1E8E300A6D543 /* OpenGraph */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenGraph; path = ../../OpenGraph; sourceTree = ""; }; + 27496E892BB1E05B00953172 /* AttributeGraph.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = AttributeGraph.xcframework; path = ../../OpenGraph/AG/AttributeGraph.xcframework; sourceTree = ""; }; + 27496E8D2BB1E0AA00953172 /* CoreServices.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CoreServices.xcframework; path = ../PrivateFrameworks/CoreServices.xcframework; sourceTree = ""; }; + 276A744D2BB1DDFD002CAB40 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = DEVELOPER_DIR; }; 27CD0B492AFC8D37003665EB /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27CD0B4C2AFC8D37003665EB /* ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleApp.swift; sourceTree = ""; }; 27CD0B4E2AFC8D37003665EB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -46,7 +51,6 @@ buildActionMask = 2147483647; files = ( 27CD0B5F2AFC8DA7003665EB /* OpenSwiftUI in Frameworks */, - 27CD0B5D2AFC8DA7003665EB /* OpenGraph in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -55,6 +59,8 @@ buildActionMask = 2147483647; files = ( 27D49E0E2BA60AF600F6E2E2 /* OpenSwiftUI in Frameworks */, + 27496E8E2BB1E0AA00953172 /* CoreServices.xcframework in Frameworks */, + 27496E8A2BB1E05B00953172 /* AttributeGraph.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -64,6 +70,7 @@ 27CD0B402AFC8D37003665EB = { isa = PBXGroup; children = ( + 271D81642BB1E8E300A6D543 /* OpenGraph */, 27CD0B612AFC8E0E003665EB /* OpenSwiftUI */, 27CD0B4B2AFC8D37003665EB /* Example */, 27D49DF92BA604FB00F6E2E2 /* HostingExample */, @@ -118,6 +125,9 @@ 27D49E0C2BA60AF600F6E2E2 /* Frameworks */ = { isa = PBXGroup; children = ( + 27496E8D2BB1E0AA00953172 /* CoreServices.xcframework */, + 27496E892BB1E05B00953172 /* AttributeGraph.xcframework */, + 276A744D2BB1DDFD002CAB40 /* CoreServices.framework */, ); name = Frameworks; sourceTree = ""; @@ -139,7 +149,6 @@ ); name = Example; packageProductDependencies = ( - 27CD0B5C2AFC8DA7003665EB /* OpenGraph */, 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */, ); productName = Example; @@ -269,7 +278,7 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 27CD0B562AFC8D38003665EB /* Debug */ = { + 272252242BB1C655009CA741 /* OpenSwiftUIDebug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -328,9 +337,81 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; - name = Debug; + name = OpenSwiftUIDebug; }; - 27CD0B572AFC8D38003665EB /* Release */ = { + 272252252BB1C655009CA741 /* OpenSwiftUIDebug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; + DEVELOPMENT_TEAM = VB7MJ8R223; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.OpenSwiftUIExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = OpenSwiftUIDebug; + }; + 272252262BB1C655009CA741 /* OpenSwiftUIDebug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = VB7MJ8R223; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = HostingExample/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.HostingExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "OEPNSWIFTUI $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = OpenSwiftUIDebug; + }; + 27CD0B562AFC8D38003665EB /* SwiftUIDebug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -364,12 +445,18 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -377,51 +464,15 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - SWIFT_COMPILATION_MODE = wholemodule; - }; - name = Release; - }; - 27CD0B592AFC8D38003665EB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; - DEVELOPMENT_TEAM = VB7MJ8R223; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.OpenSwiftUIExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; - name = Debug; + name = SwiftUIDebug; }; - 27CD0B5A2AFC8D38003665EB /* Release */ = { + 27CD0B592AFC8D38003665EB /* SwiftUIDebug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -457,9 +508,9 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Release; + name = SwiftUIDebug; }; - 27D49E0A2BA604FC00F6E2E2 /* Debug */ = { + 27D49E0A2BA604FC00F6E2E2 /* SwiftUIDebug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -483,42 +534,15 @@ PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.HostingExample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Debug; - }; - 27D49E0B2BA604FC00F6E2E2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = VB7MJ8R223; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = HostingExample/Info.plist; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.HostingExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; + name = SwiftUIDebug; }; /* End XCBuildConfiguration section */ @@ -526,37 +550,33 @@ 27CD0B442AFC8D37003665EB /* Build configuration list for PBXProject "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 27CD0B562AFC8D38003665EB /* Debug */, - 27CD0B572AFC8D38003665EB /* Release */, + 27CD0B562AFC8D38003665EB /* SwiftUIDebug */, + 272252242BB1C655009CA741 /* OpenSwiftUIDebug */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = SwiftUIDebug; }; 27CD0B582AFC8D38003665EB /* Build configuration list for PBXNativeTarget "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 27CD0B592AFC8D38003665EB /* Debug */, - 27CD0B5A2AFC8D38003665EB /* Release */, + 27CD0B592AFC8D38003665EB /* SwiftUIDebug */, + 272252252BB1C655009CA741 /* OpenSwiftUIDebug */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = SwiftUIDebug; }; 27D49E092BA604FC00F6E2E2 /* Build configuration list for PBXNativeTarget "HostingExample" */ = { isa = XCConfigurationList; buildConfigurations = ( - 27D49E0A2BA604FC00F6E2E2 /* Debug */, - 27D49E0B2BA604FC00F6E2E2 /* Release */, + 27D49E0A2BA604FC00F6E2E2 /* SwiftUIDebug */, + 272252262BB1C655009CA741 /* OpenSwiftUIDebug */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = SwiftUIDebug; }; /* End XCConfigurationList section */ /* Begin XCSwiftPackageProductDependency section */ - 27CD0B5C2AFC8DA7003665EB /* OpenGraph */ = { - isa = XCSwiftPackageProductDependency; - productName = OpenGraph; - }; 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */ = { isa = XCSwiftPackageProductDependency; productName = OpenSwiftUI; diff --git a/Example/HostingExample/ViewController.swift b/Example/HostingExample/ViewController.swift index 4fc07d2..168761d 100644 --- a/Example/HostingExample/ViewController.swift +++ b/Example/HostingExample/ViewController.swift @@ -19,14 +19,8 @@ class ViewController: UINavigationController { } } -struct ContentView: UIViewRepresentable { - func makeUIView(context: Context) -> UIView { - let view = UIView() - view.backgroundColor = .red - return view - } - - func updateUIView(_ uiView: UIView, context: Context) { - print("Update UIView") +struct ContentView: View { + var body: some View { + EmptyView() } } diff --git a/Example/Package.swift b/Example/Package.swift index 67c3eb5..b3eca91 100644 --- a/Example/Package.swift +++ b/Example/Package.swift @@ -17,11 +17,12 @@ let package = Package( name: "Example", platforms: [ .macOS(.v10_15), + .iOS(.v13), ], products: [.executable(name: "Example", targets: ["Example"])], dependencies: [ .package(path: "../"), - .package(url: "https://github.com/OpenSwiftUIProject/OpenGraph", branch: "main"), + .package(path: "../../OpenGraph") ], targets: [ exampleTarget, diff --git a/Package.resolved b/Package.resolved index 9972721..dcdaf68 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "location" : "https://github.com/OpenSwiftUIProject/OpenGraph", "state" : { "branch" : "main", - "revision" : "ccb771c9fd939f1e1eefb46f69139e94ebb0dc82" + "revision" : "6bdaabae4e0e23868f657c24fd09580f8915519c" } }, { diff --git a/PrivateFrameworks/CoreServices.xcframework/ios-arm64-arm64e/CoreServices.framework/Info.plist b/PrivateFrameworks/CoreServices.xcframework/ios-arm64-arm64e/CoreServices.framework/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..96bb6420623c10d87c8a2135cac88a1c47fc1251 GIT binary patch literal 240 zcmYc)$jK}&F)+Bw$i&RT%Er#Y$rUdkcond1, lock->main); } else if (!lock->unknown4) { lock->unknown4 = true; - dispatch_async_f(dispatch_get_main_queue(), lock, &sync_main_callback); + dispatch_async_f(dispatch_get_main_queue(), lock, (dispatch_function_t)&sync_main_callback); if (lock->unknown5) { pthread_cond_signal_thread_np(&lock->cond1, lock->main); } diff --git a/Sources/OpenSwiftUI/Core/Graph/Extensions/OGSubgraph.swift b/Sources/OpenSwiftUI/Core/Graph/Extensions/OGSubgraph.swift index d3cddf5..f541c66 100644 --- a/Sources/OpenSwiftUI/Core/Graph/Extensions/OGSubgraph.swift +++ b/Sources/OpenSwiftUI/Core/Graph/Extensions/OGSubgraph.swift @@ -3,7 +3,7 @@ internal import OpenGraphShims extension OGSubgraph { func willRemove() { #if canImport(Darwin) - OGSubgraph.apply(self, flags: .removable) { attribute in + forEach(.removable) { attribute in let type = attribute._bodyType if let removableType = type as? RemovableAttribute.Type { removableType.willRemove(attribute: attribute) @@ -14,7 +14,7 @@ extension OGSubgraph { func didReinsert() { #if canImport(Darwin) - OGSubgraph.apply(self, flags: .removable) { attribute in + forEach(.removable) { attribute in let type = attribute._bodyType if let removableType = type as? RemovableAttribute.Type { removableType.didReinsert(attribute: attribute) @@ -25,7 +25,7 @@ extension OGSubgraph { func willInvalidate(isInserted: Bool) { #if canImport(Darwin) - OGSubgraph.apply(self, flags: isInserted ? [.removable, .invalidatable] : [.invalidatable]) { attribute in + forEach(isInserted ? [.removable, .invalidatable] : [.invalidatable]) { attribute in let type = attribute._bodyType if let invalidatableType = type as? InvalidatableAttribute.Type { invalidatableType.willInvalidate(attribute: attribute) diff --git a/Sources/OpenSwiftUI/Core/Graph/GraphHost.swift b/Sources/OpenSwiftUI/Core/Graph/GraphHost.swift index b86252f..c8a1963 100644 --- a/Sources/OpenSwiftUI/Core/Graph/GraphHost.swift +++ b/Sources/OpenSwiftUI/Core/Graph/GraphHost.swift @@ -137,7 +137,6 @@ class GraphHost { // TODO: _ArchivedViewHost.reset() final func incrementPhase() { - var data = data data.phase.value += 2 graphDelegate?.graphDidChange() } diff --git a/Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift b/Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift index 28cd9a2..89fceb1 100644 --- a/Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift +++ b/Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift @@ -15,6 +15,8 @@ import UIKit open class _UIHostingView: UIView where Content: View { private var _rootView: Content var viewGraph: ViewGraph + var currentTimestamp: Time = .zero + var propertiesNeedingUpdate: ViewRendererHostProperties = [] var isRendering: Bool = false var inheritedEnvironment: EnvironmentValues? var environmentOverride: EnvironmentValues? @@ -112,24 +114,6 @@ open class _UIHostingView: UIView where Content: View { } extension _UIHostingView: ViewRendererHost { - var currentTimestamp: Time { - get { - fatalError("TODO") - } - set { - fatalError("TODO") - } - } - - var propertiesNeedingUpdate: ViewRendererHostProperties { - get { - fatalError("TODO") - } - set { - fatalError("TODO") - } - } - func requestUpdate(after: Double) { // TODO }