diff --git a/Makefile b/Makefile index 350e04f8c9db..17e2b7fe4dfd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PLATFORM_IOS = iOS Simulator,name=iPhone 11 Pro Max PLATFORM_MACOS = macOS +PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst PLATFORM_TVOS = tvOS Simulator,name=Apple TV PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 7 (45mm) @@ -9,7 +10,7 @@ test-all: test-library-debug test-library-release test-examples test-library-debug: for scheme in Dependencies ComposableArchitecture; do \ - for platform in "$(PLATFORM_WATCHOS)" "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_TVOS)"; do \ + for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_MAC_CATALYST)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \ xcodebuild test \ -workspace ComposableArchitecture.xcworkspace \ -scheme $$scheme \ @@ -19,7 +20,7 @@ test-library-debug: test-library-release: for scheme in Dependencies ComposableArchitecture; do \ - for platform in "$(PLATFORM_WATCHOS)" "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_TVOS)"; do \ + for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_MAC_CATALYST)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \ xcodebuild test \ -configuration release \ -workspace ComposableArchitecture.xcworkspace \ diff --git a/Sources/Dependencies/Dependencies/OpenURL.swift b/Sources/Dependencies/Dependencies/OpenURL.swift index 9d961177c692..ff064f6d7427 100644 --- a/Sources/Dependencies/Dependencies/OpenURL.swift +++ b/Sources/Dependencies/Dependencies/OpenURL.swift @@ -22,7 +22,7 @@ private enum OpenURLKey: DependencyKey { static let liveValue = OpenURLEffect { url in let stream = AsyncStream { continuation in let task = Task { @MainActor in - #if canImport(AppKit) + #if canImport(AppKit) && !targetEnvironment(macCatalyst) NSWorkspace.shared.open(url, configuration: .init()) { app, error in continuation.yield(app != nil && error == nil) continuation.finish()