Skip to content

non-sendable result type 'NSRunningApplication' cannot be sent from nonisolated context in call to instance method 'openApplication(at:configuration:)' #2

@henrythe9th

Description

@henrythe9th

trying to build the SDK and running into the following:
swift version 6.1
MacOS Sonoma 14.4

swift build
Building for debugging...
/Users/xxxxxx/code/MacosUseSDK/Sources/MacosUseSDK/AppOpener.swift:168:58: error: non-sendable result type 'NSRunningApplication' cannot be sent from nonisolated context in call to instance method 'openApplication(at:configuration:)'
166 | 
167 |         do {
168 |             let runningApplication = try await workspace.openApplication(at: finalAppURL, configuration: configuration)
    |                                                          `- error: non-sendable result type 'NSRunningApplication' cannot be sent from nonisolated context in call to instance method 'openApplication(at:configuration:)'
169 |             logStepCompletion("opening/activating application async call completed") // Call method
170 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSRunningApplication.h:63:12: note: class 'NSRunningApplication' does not conform to the 'Sendable' protocol
 61 | */
 62 | API_AVAILABLE(macos(10.6))
 63 | @interface NSRunningApplication : NSObject
    |            `- note: class 'NSRunningApplication' does not conform to the 'Sendable' protocol
 64 | 
 65 | /// Indicates that the process is an exited application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions