Build Information
Successful build of MediaUtilities, reference 0.0.6 (94cd1b
), with Swift 6.1 for macOS (SPM) on 30 Apr 2025 06:37:47 UTC.
Swift 6 data race errors: 12
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
66 |
67 | let rotationTransform = CGAffineTransform(rotationAngle: CGFloat(rotationInRadians))
68 | rotationTransform.concatenating(CGAffineTransform(translationX: translateX, y: translateY))
| `- warning: result of call to 'concatenating' is unused
69 |
70 | let transformedImage = ciImage.transformed(by: rotationTransform)
[35/47] Compiling MediaUtilities DropDelegateService.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
54 | }
55 | if utType.conforms(to: .image) || utType.conforms(to: .url) || utType.conforms(to: .fileURL) {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:69:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
67 | }
68 | guard let image = UnifiedImage(data: data) else {
69 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
70 | return
71 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:72:17: warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: mutation of this property is only permitted within the actor
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
70 | return
71 | }
72 | dropService.temporaryImage = image
| `- warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
73 | completeDropFromTempImageHack(image)
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:73:17: warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
71 | }
72 | dropService.temporaryImage = image
73 | completeDropFromTempImageHack(image)
| `- warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
74 | }
75 | } else {
:
141 | }
142 |
143 | func completeDropFromTempImageHack(_ image: UnifiedImage) {
| |- note: calls to instance method 'completeDropFromTempImageHack' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'DropDelegate'
144 | guard dropService.isGuarded == false else {
145 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:109:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
107 | #endif
108 | #if os(macOS)
109 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
110 | if let urlData = nsSecureCoding as? Data {
111 | let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
54 | let asset = AVAsset(url: url)
55 | if asset.isPlayable {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:79:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
77 | if itemProvider.hasItemConformingToTypeIdentifier(DropDelegateService.urlIndentifier) {
78 | Task {
79 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: DropDelegateService.urlIndentifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
80 | guard let urlData = nsSecureCoding as? Data else {
81 | return
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 | import AVFoundation
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:94:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
92 | let progress: Progress = itemProvider.loadFileRepresentation(forTypeIdentifier: DropDelegateService.audioVisualContentIndentifier) { url, err in
93 | guard let url = url, err == nil else {
94 | dropCompleted(.failure(err!))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
95 | return
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:99:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
97 | MediaPicker.copyContents(of: url) { localURL, error in
98 | if let error {
99 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
100 | dropCompleted(.failure(error))
101 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:100:25: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
98 | if let error {
99 | dropService.setIsCopying(to: false)
100 | dropCompleted(.failure(error))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | return
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:104:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
102 | }
103 | guard let localURL else {
104 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | return
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:107:21: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
105 | return
106 | }
107 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
108 | dropCompleted(.success(localURL))
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:108:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
106 | }
107 | dropService.setIsCopying(to: false)
108 | dropCompleted(.success(localURL))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/Holistic/VideoPicker.swift:206:27: warning: immutable value 'err' was never used; consider replacing with '_' or removing it
204 | }
205 | }
206 | case .failure(let err):
| `- warning: immutable value 'err' was never used; consider replacing with '_' or removing it
207 | withAnimation {
208 | isShowingVideoEditor = false
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:43:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
41 | func setIsAllowed(to bool: Bool) {
42 | DispatchQueue.main.async {
43 | self.isAllowed = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
44 | self.processAttempts()
45 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:50:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
48 | func setIsCopying(to bool: Bool) {
49 | DispatchQueue.main.async {
50 | self.isCopyingFile = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
51 | }
52 | }
[36/47] Compiling MediaUtilities ImageDropDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
54 | }
55 | if utType.conforms(to: .image) || utType.conforms(to: .url) || utType.conforms(to: .fileURL) {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:69:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
67 | }
68 | guard let image = UnifiedImage(data: data) else {
69 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
70 | return
71 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:72:17: warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: mutation of this property is only permitted within the actor
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
70 | return
71 | }
72 | dropService.temporaryImage = image
| `- warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
73 | completeDropFromTempImageHack(image)
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:73:17: warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
71 | }
72 | dropService.temporaryImage = image
73 | completeDropFromTempImageHack(image)
| `- warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
74 | }
75 | } else {
:
141 | }
142 |
143 | func completeDropFromTempImageHack(_ image: UnifiedImage) {
| |- note: calls to instance method 'completeDropFromTempImageHack' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'DropDelegate'
144 | guard dropService.isGuarded == false else {
145 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:109:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
107 | #endif
108 | #if os(macOS)
109 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
110 | if let urlData = nsSecureCoding as? Data {
111 | let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
54 | let asset = AVAsset(url: url)
55 | if asset.isPlayable {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:79:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
77 | if itemProvider.hasItemConformingToTypeIdentifier(DropDelegateService.urlIndentifier) {
78 | Task {
79 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: DropDelegateService.urlIndentifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
80 | guard let urlData = nsSecureCoding as? Data else {
81 | return
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 | import AVFoundation
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:94:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
92 | let progress: Progress = itemProvider.loadFileRepresentation(forTypeIdentifier: DropDelegateService.audioVisualContentIndentifier) { url, err in
93 | guard let url = url, err == nil else {
94 | dropCompleted(.failure(err!))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
95 | return
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:99:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
97 | MediaPicker.copyContents(of: url) { localURL, error in
98 | if let error {
99 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
100 | dropCompleted(.failure(error))
101 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:100:25: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
98 | if let error {
99 | dropService.setIsCopying(to: false)
100 | dropCompleted(.failure(error))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | return
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:104:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
102 | }
103 | guard let localURL else {
104 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | return
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:107:21: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
105 | return
106 | }
107 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
108 | dropCompleted(.success(localURL))
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:108:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
106 | }
107 | dropService.setIsCopying(to: false)
108 | dropCompleted(.success(localURL))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/Holistic/VideoPicker.swift:206:27: warning: immutable value 'err' was never used; consider replacing with '_' or removing it
204 | }
205 | }
206 | case .failure(let err):
| `- warning: immutable value 'err' was never used; consider replacing with '_' or removing it
207 | withAnimation {
208 | isShowingVideoEditor = false
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:43:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
41 | func setIsAllowed(to bool: Bool) {
42 | DispatchQueue.main.async {
43 | self.isAllowed = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
44 | self.processAttempts()
45 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:50:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
48 | func setIsCopying(to bool: Bool) {
49 | DispatchQueue.main.async {
50 | self.isCopyingFile = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
51 | }
52 | }
[37/47] Compiling MediaUtilities VideoDropDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
54 | }
55 | if utType.conforms(to: .image) || utType.conforms(to: .url) || utType.conforms(to: .fileURL) {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:69:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
67 | }
68 | guard let image = UnifiedImage(data: data) else {
69 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
70 | return
71 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:72:17: warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: mutation of this property is only permitted within the actor
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
70 | return
71 | }
72 | dropService.temporaryImage = image
| `- warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
73 | completeDropFromTempImageHack(image)
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:73:17: warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
71 | }
72 | dropService.temporaryImage = image
73 | completeDropFromTempImageHack(image)
| `- warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
74 | }
75 | } else {
:
141 | }
142 |
143 | func completeDropFromTempImageHack(_ image: UnifiedImage) {
| |- note: calls to instance method 'completeDropFromTempImageHack' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'DropDelegate'
144 | guard dropService.isGuarded == false else {
145 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:109:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
107 | #endif
108 | #if os(macOS)
109 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
110 | if let urlData = nsSecureCoding as? Data {
111 | let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
54 | let asset = AVAsset(url: url)
55 | if asset.isPlayable {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:79:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
77 | if itemProvider.hasItemConformingToTypeIdentifier(DropDelegateService.urlIndentifier) {
78 | Task {
79 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: DropDelegateService.urlIndentifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
80 | guard let urlData = nsSecureCoding as? Data else {
81 | return
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 | import AVFoundation
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:94:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
92 | let progress: Progress = itemProvider.loadFileRepresentation(forTypeIdentifier: DropDelegateService.audioVisualContentIndentifier) { url, err in
93 | guard let url = url, err == nil else {
94 | dropCompleted(.failure(err!))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
95 | return
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:99:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
97 | MediaPicker.copyContents(of: url) { localURL, error in
98 | if let error {
99 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
100 | dropCompleted(.failure(error))
101 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:100:25: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
98 | if let error {
99 | dropService.setIsCopying(to: false)
100 | dropCompleted(.failure(error))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | return
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:104:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
102 | }
103 | guard let localURL else {
104 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | return
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:107:21: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
105 | return
106 | }
107 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
108 | dropCompleted(.success(localURL))
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:108:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
106 | }
107 | dropService.setIsCopying(to: false)
108 | dropCompleted(.success(localURL))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/Holistic/VideoPicker.swift:206:27: warning: immutable value 'err' was never used; consider replacing with '_' or removing it
204 | }
205 | }
206 | case .failure(let err):
| `- warning: immutable value 'err' was never used; consider replacing with '_' or removing it
207 | withAnimation {
208 | isShowingVideoEditor = false
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:43:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
41 | func setIsAllowed(to bool: Bool) {
42 | DispatchQueue.main.async {
43 | self.isAllowed = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
44 | self.processAttempts()
45 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:50:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
48 | func setIsCopying(to bool: Bool) {
49 | DispatchQueue.main.async {
50 | self.isCopyingFile = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
51 | }
52 | }
[38/47] Compiling MediaUtilities ImagePicker.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
54 | }
55 | if utType.conforms(to: .image) || utType.conforms(to: .url) || utType.conforms(to: .fileURL) {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:69:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
67 | }
68 | guard let image = UnifiedImage(data: data) else {
69 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
70 | return
71 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:72:17: warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: mutation of this property is only permitted within the actor
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
70 | return
71 | }
72 | dropService.temporaryImage = image
| `- warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
73 | completeDropFromTempImageHack(image)
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:73:17: warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
71 | }
72 | dropService.temporaryImage = image
73 | completeDropFromTempImageHack(image)
| `- warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
74 | }
75 | } else {
:
141 | }
142 |
143 | func completeDropFromTempImageHack(_ image: UnifiedImage) {
| |- note: calls to instance method 'completeDropFromTempImageHack' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'DropDelegate'
144 | guard dropService.isGuarded == false else {
145 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:109:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
107 | #endif
108 | #if os(macOS)
109 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
110 | if let urlData = nsSecureCoding as? Data {
111 | let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
54 | let asset = AVAsset(url: url)
55 | if asset.isPlayable {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:79:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
77 | if itemProvider.hasItemConformingToTypeIdentifier(DropDelegateService.urlIndentifier) {
78 | Task {
79 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: DropDelegateService.urlIndentifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
80 | guard let urlData = nsSecureCoding as? Data else {
81 | return
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 | import AVFoundation
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:94:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
92 | let progress: Progress = itemProvider.loadFileRepresentation(forTypeIdentifier: DropDelegateService.audioVisualContentIndentifier) { url, err in
93 | guard let url = url, err == nil else {
94 | dropCompleted(.failure(err!))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
95 | return
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:99:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
97 | MediaPicker.copyContents(of: url) { localURL, error in
98 | if let error {
99 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
100 | dropCompleted(.failure(error))
101 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:100:25: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
98 | if let error {
99 | dropService.setIsCopying(to: false)
100 | dropCompleted(.failure(error))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | return
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:104:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
102 | }
103 | guard let localURL else {
104 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | return
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:107:21: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
105 | return
106 | }
107 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
108 | dropCompleted(.success(localURL))
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:108:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
106 | }
107 | dropService.setIsCopying(to: false)
108 | dropCompleted(.success(localURL))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/Holistic/VideoPicker.swift:206:27: warning: immutable value 'err' was never used; consider replacing with '_' or removing it
204 | }
205 | }
206 | case .failure(let err):
| `- warning: immutable value 'err' was never used; consider replacing with '_' or removing it
207 | withAnimation {
208 | isShowingVideoEditor = false
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:43:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
41 | func setIsAllowed(to bool: Bool) {
42 | DispatchQueue.main.async {
43 | self.isAllowed = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
44 | self.processAttempts()
45 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:50:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
48 | func setIsCopying(to bool: Bool) {
49 | DispatchQueue.main.async {
50 | self.isCopyingFile = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
51 | }
52 | }
[39/47] Compiling MediaUtilities VideoPicker.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
54 | }
55 | if utType.conforms(to: .image) || utType.conforms(to: .url) || utType.conforms(to: .fileURL) {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:69:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
67 | }
68 | guard let image = UnifiedImage(data: data) else {
69 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
70 | return
71 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:72:17: warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
11 | @available(iOS 14.0, macOS 11, *)
12 | struct ImageDropDelegate: DropDelegate {
13 | @ObservedObject var dropService: DropDelegateService
| `- note: mutation of this property is only permitted within the actor
14 | var dropCompleted: (Result<UnifiedImage, Error>) -> Void
15 |
:
70 | return
71 | }
72 | dropService.temporaryImage = image
| `- warning: main actor-isolated property 'dropService' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
73 | completeDropFromTempImageHack(image)
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:73:17: warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
71 | }
72 | dropService.temporaryImage = image
73 | completeDropFromTempImageHack(image)
| `- warning: call to main actor-isolated instance method 'completeDropFromTempImageHack' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
74 | }
75 | } else {
:
141 | }
142 |
143 | func completeDropFromTempImageHack(_ image: UnifiedImage) {
| |- note: calls to instance method 'completeDropFromTempImageHack' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'DropDelegate'
144 | guard dropService.isGuarded == false else {
145 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:109:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
107 | #endif
108 | #if os(macOS)
109 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
110 | if let urlData = nsSecureCoding as? Data {
111 | let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/ImageDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:56:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
54 | let asset = AVAsset(url: url)
55 | if asset.isPlayable {
56 | dropService.setIsAllowed(to: true)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
57 | } else {
58 | dropService.setIsAllowed(to: false)
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:58:21: warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
56 | dropService.setIsAllowed(to: true)
57 | } else {
58 | dropService.setIsAllowed(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
59 | }
60 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:79:61: warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
77 | if itemProvider.hasItemConformingToTypeIdentifier(DropDelegateService.urlIndentifier) {
78 | Task {
79 | let nsSecureCoding = try await itemProvider.loadItem(forTypeIdentifier: DropDelegateService.urlIndentifier, options: nil)
| `- warning: non-sendable result type 'any NSSecureCoding' cannot be sent from nonisolated context in call to instance method 'loadItem(forTypeIdentifier:options:)'; this is an error in the Swift 6 language mode
80 | guard let urlData = nsSecureCoding as? Data else {
81 | return
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:11: note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
34 | // NOTE: NSSecureCoding guarantees only that an archive contains the classes it claims. It makes no guarantees about the suitability for consumption by the receiver of the decoded content of the archive. Archived objects which may trigger code evaluation should be validated independently by the consumer of the objects to verify that no malicious code is executed (i.e. by checking key paths, selectors etc. specified in the archive).
35 |
36 | @protocol NSSecureCoding <NSCoding>
| `- note: protocol 'NSSecureCoding' does not conform to the 'Sendable' protocol
37 | @required
38 | // This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES.
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
6 | //
7 |
8 | import SwiftUI
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Foundation'
9 | import UniformTypeIdentifiers
10 | import AVFoundation
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:94:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
92 | let progress: Progress = itemProvider.loadFileRepresentation(forTypeIdentifier: DropDelegateService.audioVisualContentIndentifier) { url, err in
93 | guard let url = url, err == nil else {
94 | dropCompleted(.failure(err!))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
95 | return
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:99:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
97 | MediaPicker.copyContents(of: url) { localURL, error in
98 | if let error {
99 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
100 | dropCompleted(.failure(error))
101 | return
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:100:25: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
98 | if let error {
99 | dropService.setIsCopying(to: false)
100 | dropCompleted(.failure(error))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | return
102 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:104:25: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
102 | }
103 | guard let localURL else {
104 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | return
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:107:21: warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | @available(iOS 13.4, macOS 10.15, *)
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
| `- note: property declared here
22 | var dropCompleted: (Result<URL, Error>) -> Void
23 | @State private var subscriptions: Set<AnyCancellable> = []
:
105 | return
106 | }
107 | dropService.setIsCopying(to: false)
| `- warning: main actor-isolated property 'dropService' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
108 | dropCompleted(.success(localURL))
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/VideoDropDelegate.swift:108:21: warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | struct VideoDropDelegate: DropDelegate {
21 | @ObservedObject var dropService: DropDelegateService
22 | var dropCompleted: (Result<URL, Error>) -> Void
| `- note: property declared here
23 | @State private var subscriptions: Set<AnyCancellable> = []
24 |
:
106 | }
107 | dropService.setIsCopying(to: false)
108 | dropCompleted(.success(localURL))
| `- warning: main actor-isolated property 'dropCompleted' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/Holistic/VideoPicker.swift:206:27: warning: immutable value 'err' was never used; consider replacing with '_' or removing it
204 | }
205 | }
206 | case .failure(let err):
| `- warning: immutable value 'err' was never used; consider replacing with '_' or removing it
207 | withAnimation {
208 | isShowingVideoEditor = false
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:43:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
41 | func setIsAllowed(to bool: Bool) {
42 | DispatchQueue.main.async {
43 | self.isAllowed = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
44 | self.processAttempts()
45 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/DropDelegate/DropDelegateService.swift:50:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
48 | func setIsCopying(to bool: Bool) {
49 | DispatchQueue.main.async {
50 | self.isCopyingFile = bool
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
51 | }
52 | }
[40/47] Compiling MediaUtilities AnyRangeSliderStyle.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/EnvironmentValues+RangeSliderStyle.swift:17:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
15 | @available(iOS 13.0, macOS 10.15, *)
16 | struct RangeSliderStyleKey: EnvironmentKey {
17 | static let defaultValue: AnyRangeSliderStyle = AnyRangeSliderStyle(
| |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | HorizontalRangeSliderStyle()
19 | )
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/AnyRangeSliderStyle.swift:4:15: note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
2 |
3 | @available(iOS 13.0, macOS 10.15, *)
4 | public struct AnyRangeSliderStyle: RangeSliderStyle {
| `- note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
5 | private let styleMakeBody: (RangeSliderStyle.Configuration) -> AnyView
6 |
[41/47] Compiling MediaUtilities EnvironmentValues+RangeSliderStyle.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/EnvironmentValues+RangeSliderStyle.swift:17:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
15 | @available(iOS 13.0, macOS 10.15, *)
16 | struct RangeSliderStyleKey: EnvironmentKey {
17 | static let defaultValue: AnyRangeSliderStyle = AnyRangeSliderStyle(
| |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | HorizontalRangeSliderStyle()
19 | )
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/AnyRangeSliderStyle.swift:4:15: note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
2 |
3 | @available(iOS 13.0, macOS 10.15, *)
4 | public struct AnyRangeSliderStyle: RangeSliderStyle {
| `- note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
5 | private let styleMakeBody: (RangeSliderStyle.Configuration) -> AnyView
6 |
[42/47] Compiling MediaUtilities RangeSliderStyle.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/EnvironmentValues+RangeSliderStyle.swift:17:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
15 | @available(iOS 13.0, macOS 10.15, *)
16 | struct RangeSliderStyleKey: EnvironmentKey {
17 | static let defaultValue: AnyRangeSliderStyle = AnyRangeSliderStyle(
| |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | HorizontalRangeSliderStyle()
19 | )
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/AnyRangeSliderStyle.swift:4:15: note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
2 |
3 | @available(iOS 13.0, macOS 10.15, *)
4 | public struct AnyRangeSliderStyle: RangeSliderStyle {
| `- note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
5 | private let styleMakeBody: (RangeSliderStyle.Configuration) -> AnyView
6 |
[43/47] Compiling MediaUtilities RangeSliderStyleConfiguration.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/EnvironmentValues+RangeSliderStyle.swift:17:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
15 | @available(iOS 13.0, macOS 10.15, *)
16 | struct RangeSliderStyleKey: EnvironmentKey {
17 | static let defaultValue: AnyRangeSliderStyle = AnyRangeSliderStyle(
| |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'AnyRangeSliderStyle' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | HorizontalRangeSliderStyle()
19 | )
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/Sliders/RangeSlider/Style/AnyRangeSliderStyle.swift:4:15: note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
2 |
3 | @available(iOS 13.0, macOS 10.15, *)
4 | public struct AnyRangeSliderStyle: RangeSliderStyle {
| `- note: consider making struct 'AnyRangeSliderStyle' conform to the 'Sendable' protocol
5 | private let styleMakeBody: (RangeSliderStyle.Configuration) -> AnyView
6 |
[44/47] Compiling MediaUtilities VideoSliderView.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoSliderView.swift:136:21: warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 |
15 | @State private var maxWidth: CGFloat = 0
16 | @State private var isShowingSeekerTime = false
| `- note: mutation of this property is only permitted within the actor
17 | @State private var timer: Timer?
18 | let seekerHeight: CGFloat = 50
:
134 | timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in
135 | withAnimation {
136 | isShowingSeekerTime = false
| `- warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:80:16: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
78 |
79 | exporter.exportAsynchronously {
80 | if exporter.status == .completed {
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:82:21: warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
80 | if exporter.status == .completed {
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
| |- warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
83 | }
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:102:21: warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
102 | callback(.failure(.exporterCancelled))
| |- warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
103 | }
104 | if exporter.status == .failed {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:49: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:79: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:150:25: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
148 | let image = UnifiedImage(cgImage: img)
149 | DispatchQueue.main.async {
150 | self.videoImageFrames.append(image)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
151 | }
152 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/CustomVideoPlayer.swift:100:20: warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
61 | @available(macOS 10.15, *)
62 | public struct CustomVideoPlayer: NSViewRepresentable {
63 | @EnvironmentObject private var playerVM: PlayerViewModel
| `- note: property declared here
64 |
65 | public init() { }
:
98 |
99 | private var playerVM: PlayerViewModel {
100 | parent.playerVM
| `- warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:79:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
77 | .filter({ $0 == .readyToPlay })
78 | .sink(receiveValue: { [weak self] _ in
79 | let time = item.asset.duration.seconds
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:82:30: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
82 | self?.player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
83 | })
84 | .store(in: &subscriptions)
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:93:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public func seekForward() {
| `- note: add '@MainActor' to make instance method 'seekForward()' part of global actor 'MainActor'
88 | var time = currentTime + 10
89 | if time >= duration {
:
91 | }
92 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
93 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:102:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
96 | public func seekBackward() {
| `- note: add '@MainActor' to make instance method 'seekBackward()' part of global actor 'MainActor'
97 | var time = currentTime - 10
98 | if time <= 0 {
:
100 | }
101 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
102 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:106:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
105 | public func play() {
| `- note: add '@MainActor' to make instance method 'play()' part of global actor 'MainActor'
106 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:110:16: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
109 | public func pause() {
| `- note: add '@MainActor' to make instance method 'pause()' part of global actor 'MainActor'
110 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
111 | }
112 |
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:139:30: warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | final public class PlayerViewModel: ObservableObject {
| `- note: class 'PlayerViewModel' does not conform to the 'Sendable' protocol
14 | public var player = AVPlayer()
15 | @Published public var allowsPictureInPicturePlayback: Bool = true
:
137 | let interval = CMTime(seconds: isShowingControls ? 1 : 0.25, preferredTimescale: 60)
138 | timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main) { [weak self] time in
139 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
140 | self.updateCurrentTime(time)
141 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:166:20: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
167 | } else {
168 | player.pause()
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:168:20: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
167 | } else {
168 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
169 | }
170 | }
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:131:37: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
129 | func generateImageFrames() {
130 | videoImageFrames = []
131 | Task(priority: .background) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
132 | guard let asset = asset else {
| `- note: closure captures 'self' which is accessible to code in the current task
133 | return
134 | }
[45/47] Compiling MediaUtilities VideoUtil.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoSliderView.swift:136:21: warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 |
15 | @State private var maxWidth: CGFloat = 0
16 | @State private var isShowingSeekerTime = false
| `- note: mutation of this property is only permitted within the actor
17 | @State private var timer: Timer?
18 | let seekerHeight: CGFloat = 50
:
134 | timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in
135 | withAnimation {
136 | isShowingSeekerTime = false
| `- warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:80:16: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
78 |
79 | exporter.exportAsynchronously {
80 | if exporter.status == .completed {
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:82:21: warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
80 | if exporter.status == .completed {
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
| |- warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
83 | }
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:102:21: warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
102 | callback(.failure(.exporterCancelled))
| |- warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
103 | }
104 | if exporter.status == .failed {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:49: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:79: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:150:25: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
148 | let image = UnifiedImage(cgImage: img)
149 | DispatchQueue.main.async {
150 | self.videoImageFrames.append(image)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
151 | }
152 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/CustomVideoPlayer.swift:100:20: warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
61 | @available(macOS 10.15, *)
62 | public struct CustomVideoPlayer: NSViewRepresentable {
63 | @EnvironmentObject private var playerVM: PlayerViewModel
| `- note: property declared here
64 |
65 | public init() { }
:
98 |
99 | private var playerVM: PlayerViewModel {
100 | parent.playerVM
| `- warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:79:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
77 | .filter({ $0 == .readyToPlay })
78 | .sink(receiveValue: { [weak self] _ in
79 | let time = item.asset.duration.seconds
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:82:30: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
82 | self?.player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
83 | })
84 | .store(in: &subscriptions)
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:93:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public func seekForward() {
| `- note: add '@MainActor' to make instance method 'seekForward()' part of global actor 'MainActor'
88 | var time = currentTime + 10
89 | if time >= duration {
:
91 | }
92 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
93 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:102:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
96 | public func seekBackward() {
| `- note: add '@MainActor' to make instance method 'seekBackward()' part of global actor 'MainActor'
97 | var time = currentTime - 10
98 | if time <= 0 {
:
100 | }
101 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
102 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:106:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
105 | public func play() {
| `- note: add '@MainActor' to make instance method 'play()' part of global actor 'MainActor'
106 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:110:16: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
109 | public func pause() {
| `- note: add '@MainActor' to make instance method 'pause()' part of global actor 'MainActor'
110 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
111 | }
112 |
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:139:30: warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | final public class PlayerViewModel: ObservableObject {
| `- note: class 'PlayerViewModel' does not conform to the 'Sendable' protocol
14 | public var player = AVPlayer()
15 | @Published public var allowsPictureInPicturePlayback: Bool = true
:
137 | let interval = CMTime(seconds: isShowingControls ? 1 : 0.25, preferredTimescale: 60)
138 | timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main) { [weak self] time in
139 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
140 | self.updateCurrentTime(time)
141 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:166:20: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
167 | } else {
168 | player.pause()
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:168:20: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
167 | } else {
168 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
169 | }
170 | }
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:131:37: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
129 | func generateImageFrames() {
130 | videoImageFrames = []
131 | Task(priority: .background) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
132 | guard let asset = asset else {
| `- note: closure captures 'self' which is accessible to code in the current task
133 | return
134 | }
[46/47] Compiling MediaUtilities CustomVideoPlayer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoSliderView.swift:136:21: warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 |
15 | @State private var maxWidth: CGFloat = 0
16 | @State private var isShowingSeekerTime = false
| `- note: mutation of this property is only permitted within the actor
17 | @State private var timer: Timer?
18 | let seekerHeight: CGFloat = 50
:
134 | timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in
135 | withAnimation {
136 | isShowingSeekerTime = false
| `- warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:80:16: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
78 |
79 | exporter.exportAsynchronously {
80 | if exporter.status == .completed {
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:82:21: warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
80 | if exporter.status == .completed {
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
| |- warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
83 | }
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:102:21: warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
102 | callback(.failure(.exporterCancelled))
| |- warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
103 | }
104 | if exporter.status == .failed {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:49: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:79: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:150:25: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
148 | let image = UnifiedImage(cgImage: img)
149 | DispatchQueue.main.async {
150 | self.videoImageFrames.append(image)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
151 | }
152 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/CustomVideoPlayer.swift:100:20: warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
61 | @available(macOS 10.15, *)
62 | public struct CustomVideoPlayer: NSViewRepresentable {
63 | @EnvironmentObject private var playerVM: PlayerViewModel
| `- note: property declared here
64 |
65 | public init() { }
:
98 |
99 | private var playerVM: PlayerViewModel {
100 | parent.playerVM
| `- warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:79:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
77 | .filter({ $0 == .readyToPlay })
78 | .sink(receiveValue: { [weak self] _ in
79 | let time = item.asset.duration.seconds
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:82:30: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
82 | self?.player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
83 | })
84 | .store(in: &subscriptions)
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:93:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public func seekForward() {
| `- note: add '@MainActor' to make instance method 'seekForward()' part of global actor 'MainActor'
88 | var time = currentTime + 10
89 | if time >= duration {
:
91 | }
92 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
93 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:102:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
96 | public func seekBackward() {
| `- note: add '@MainActor' to make instance method 'seekBackward()' part of global actor 'MainActor'
97 | var time = currentTime - 10
98 | if time <= 0 {
:
100 | }
101 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
102 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:106:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
105 | public func play() {
| `- note: add '@MainActor' to make instance method 'play()' part of global actor 'MainActor'
106 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:110:16: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
109 | public func pause() {
| `- note: add '@MainActor' to make instance method 'pause()' part of global actor 'MainActor'
110 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
111 | }
112 |
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:139:30: warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | final public class PlayerViewModel: ObservableObject {
| `- note: class 'PlayerViewModel' does not conform to the 'Sendable' protocol
14 | public var player = AVPlayer()
15 | @Published public var allowsPictureInPicturePlayback: Bool = true
:
137 | let interval = CMTime(seconds: isShowingControls ? 1 : 0.25, preferredTimescale: 60)
138 | timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main) { [weak self] time in
139 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
140 | self.updateCurrentTime(time)
141 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:166:20: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
167 | } else {
168 | player.pause()
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:168:20: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
167 | } else {
168 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
169 | }
170 | }
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:131:37: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
129 | func generateImageFrames() {
130 | videoImageFrames = []
131 | Task(priority: .background) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
132 | guard let asset = asset else {
| `- note: closure captures 'self' which is accessible to code in the current task
133 | return
134 | }
[47/47] Compiling MediaUtilities PlayerViewModel.swift
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoSliderView.swift:136:21: warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
14 |
15 | @State private var maxWidth: CGFloat = 0
16 | @State private var isShowingSeekerTime = false
| `- note: mutation of this property is only permitted within the actor
17 | @State private var timer: Timer?
18 | let seekerHeight: CGFloat = 50
:
134 | timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in
135 | withAnimation {
136 | isShowingSeekerTime = false
| `- warning: main actor-isolated property 'isShowingSeekerTime' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:80:16: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
78 |
79 | exporter.exportAsynchronously {
80 | if exporter.status == .completed {
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:82:21: warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
80 | if exporter.status == .completed {
81 | DispatchQueue.main.async {
82 | onCompletion(.success(outputVideoURL))
| |- warning: capture of 'onCompletion' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
83 | }
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:102:21: warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
102 | callback(.failure(.exporterCancelled))
| |- warning: capture of 'callback' with non-sendable type '(Result<URL, VideoUtil.VideoUtilError>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
103 | }
104 | if exporter.status == .failed {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:17: warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:97:40: warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
95 | timer = Timer.scheduledTimer(withTimeInterval: 0.25, repeats: true) { _ in
96 | withAnimation {
97 | self.progress = Double(exporter.progress)
| `- warning: capture of 'exporter' with non-sendable type 'AVAssetExportSession' in an isolated closure; this is an error in the Swift 6 language mode
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:49: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:99:79: warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
97 | self.progress = Double(exporter.progress)
98 | }
99 | if exporter.status == .completed || exporter.status == .failed || exporter.status == .cancelled {
| `- warning: implicit capture of 'exporter' requires that 'AVAssetExportSession' conforms to 'Sendable'; this is an error in the Swift 6 language mode
100 | self.timer?.invalidate()
101 | if exporter.status == .cancelled {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:150:25: warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | public final class VideoUtil: ObservableObject {
| `- note: class 'VideoUtil' does not conform to the 'Sendable' protocol
14 | @Published var progress: Double = .zero
15 | @Published var videoImageFrames: [UnifiedImage] = []
:
148 | let image = UnifiedImage(cgImage: img)
149 | DispatchQueue.main.async {
150 | self.videoImageFrames.append(image)
| `- warning: capture of 'self' with non-sendable type 'VideoUtil' in a '@Sendable' closure
151 | }
152 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/CustomVideoPlayer.swift:100:20: warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
61 | @available(macOS 10.15, *)
62 | public struct CustomVideoPlayer: NSViewRepresentable {
63 | @EnvironmentObject private var playerVM: PlayerViewModel
| `- note: property declared here
64 |
65 | public init() { }
:
98 |
99 | private var playerVM: PlayerViewModel {
100 | parent.playerVM
| `- warning: main actor-isolated property 'playerVM' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
101 | }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:79:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
77 | .filter({ $0 == .readyToPlay })
78 | .sink(receiveValue: { [weak self] _ in
79 | let time = item.asset.duration.seconds
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:82:30: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
80 | self?.duration = time
81 | self?.endPlayingAt = time
82 | self?.player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
83 | })
84 | .store(in: &subscriptions)
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:93:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public func seekForward() {
| `- note: add '@MainActor' to make instance method 'seekForward()' part of global actor 'MainActor'
88 | var time = currentTime + 10
89 | if time >= duration {
:
91 | }
92 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
93 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:102:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 |
96 | public func seekBackward() {
| `- note: add '@MainActor' to make instance method 'seekBackward()' part of global actor 'MainActor'
97 | var time = currentTime - 10
98 | if time <= 0 {
:
100 | }
101 | player.seek(to: CMTime(seconds: time, preferredTimescale: 1000))
102 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:106:16: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
103 | }
104 |
105 | public func play() {
| `- note: add '@MainActor' to make instance method 'play()' part of global actor 'MainActor'
106 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:110:16: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
107 | }
108 |
109 | public func pause() {
| `- note: add '@MainActor' to make instance method 'pause()' part of global actor 'MainActor'
110 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
111 | }
112 |
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:139:30: warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
11 |
12 | @available(iOS 13.0, macOS 10.15, *)
13 | final public class PlayerViewModel: ObservableObject {
| `- note: class 'PlayerViewModel' does not conform to the 'Sendable' protocol
14 | public var player = AVPlayer()
15 | @Published public var allowsPictureInPicturePlayback: Bool = true
:
137 | let interval = CMTime(seconds: isShowingControls ? 1 : 0.25, preferredTimescale: 60)
138 | timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main) { [weak self] time in
139 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'PlayerViewModel?' in a '@Sendable' closure
140 | self.updateCurrentTime(time)
141 | }
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:166:20: warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
| `- warning: call to main actor-isolated instance method 'play()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
167 | } else {
168 | player.pause()
AVFoundation.AVPlayer.play:2:22: note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func play()}
| `- note: calls to instance method 'play()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoPlayer/PlayerViewModel.swift:168:20: warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
161 | }
162 |
163 | private func endPlayingAtReached() {
| `- note: add '@MainActor' to make instance method 'endPlayingAtReached()' part of global actor 'MainActor'
164 | if loopPlayback {
165 | seekTo(startPlayingAt)
166 | player.play()
167 | } else {
168 | player.pause()
| `- warning: call to main actor-isolated instance method 'pause()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
169 | }
170 | }
AVFoundation.AVPlayer.pause:2:22: note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
1 | class AVPlayer {
2 | @MainActor open func pause()}
| `- note: calls to instance method 'pause()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/MediaUtilities/VideoEditor/VideoUtil.swift:131:37: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
129 | func generateImageFrames() {
130 | videoImageFrames = []
131 | Task(priority: .background) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
132 | guard let asset = asset else {
| `- note: closure captures 'self' which is accessible to code in the current task
133 | return
134 | }
Build complete! (11.32s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "MediaUtilities",
"name" : "MediaUtilities",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "MediaUtilities",
"targets" : [
"MediaUtilities"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "MediaUtilitiesTests",
"module_type" : "SwiftTarget",
"name" : "MediaUtilitiesTests",
"path" : "Tests/MediaUtilitiesTests",
"sources" : [
"MediaUtilitiesTests.swift"
],
"target_dependencies" : [
"MediaUtilities"
],
"type" : "test"
},
{
"c99name" : "MediaUtilities",
"module_type" : "SwiftTarget",
"name" : "MediaUtilities",
"path" : "Sources/MediaUtilities",
"product_memberships" : [
"MediaUtilities"
],
"sources" : [
"DropDelegate/DropDelegateService.swift",
"DropDelegate/ImageDropDelegate.swift",
"DropDelegate/VideoDropDelegate.swift",
"Holistic/ImagePicker.swift",
"Holistic/VideoPicker.swift",
"ImageEditor/CropImageView.swift",
"ImageEditor/HoleShapeMask.swift",
"ImageEditor/ImageEditor.swift",
"ImageEditor/WhiteGridOverlay.swift",
"MediaPicker/MediaOptions.swift",
"MediaPicker/MediaPicker-iOS.swift",
"MediaPicker/MediaPicker-macOS.swift",
"MediaPicker/MediaPicker.swift",
"MediaUtilities.swift",
"Modifiers/GrayBackgroundRound.swift",
"Modifiers/OnTapModifier.swift",
"Modifiers/Shake Modifier.swift",
"Modifiers/SwiftUI+Extentions.swift",
"Shared/EditorControlButton.swift",
"Shared/MediaUtilitiesError.swift",
"Shared/SpinnerView.swift",
"Shared/UnifiedImage.swift",
"VideoEditor/Sliders/Base/DefaultHorizontalValueView.swift",
"VideoEditor/Sliders/Base/DefaultThumb.swift",
"VideoEditor/Sliders/Base/DefaultVerticalValueView.swift",
"VideoEditor/Sliders/Base/LinearRangeMath.swift",
"VideoEditor/Sliders/Base/LinearValueMath.swift",
"VideoEditor/Sliders/RangeSlider/RangeSlider.swift",
"VideoEditor/Sliders/RangeSlider/Style/AnyRangeSliderStyle.swift",
"VideoEditor/Sliders/RangeSlider/Style/EnvironmentValues+RangeSliderStyle.swift",
"VideoEditor/Sliders/RangeSlider/Style/RangeSliderStyle.swift",
"VideoEditor/Sliders/RangeSlider/Style/RangeSliderStyleConfiguration.swift",
"VideoEditor/Sliders/RangeSlider/Styles/HorizontalRangeSliderStyle.swift",
"VideoEditor/Sliders/RangeSlider/Styles/RangeSliderOptions.swift",
"VideoEditor/Sliders/RangeTrack/EnvironmentValues+RangeTrackConfiguration.swift",
"VideoEditor/Sliders/RangeTrack/EnvironmentValues+TrackRange.swift",
"VideoEditor/Sliders/RangeTrack/Horizontal/HorizontalRangeTrack.swift",
"VideoEditor/Sliders/RangeTrack/RangeTrackConfiguration.swift",
"VideoEditor/VideoDownloader.swift",
"VideoEditor/VideoEditor.swift",
"VideoEditor/VideoSliderView.swift",
"VideoEditor/VideoUtil.swift",
"VideoPlayer/CustomVideoPlayer.swift",
"VideoPlayer/PlayerViewModel.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Done.