https://developer.apple.com/forums/thread/731732 Possibly linked to the above issue
The app compiles just fine, but SwiftUI Previews cannot build if there any any packages that lack support for visionOS
I made sure that filters were enabled so that the package is only linked to iOS
In a project that literally NEVER imports or uses an iOS only package, it fails completely
== PREVIEW UPDATE ERROR:
SchemeBuildError: Failed to build the scheme ”VisionHelloWorld”
'tracks(withMediaType:)' is unavailable in visionOS
Compile LightCompressor.swift (arm64):
/Users/bryananderson/Library/Developer/Xcode/DerivedData/VisionHelloWorld-dviwzruidaouzeeafminiifghzfe/SourcePackages/checkouts/LightCompressor_iOS/Sources/LightCompressor/LightCompressor.swift:123:47: error: 'tracks(withMediaType:)' is unavailable in visionOS
guard let videoTrack = videoAsset.tracks(withMediaType: AVMediaType.video).first else {
^~~~~~
AVFoundation.AVAsset:17:15: note: 'tracks(withMediaType:)' has been explicitly marked unavailable here
open func tracks(withMediaType mediaType: AVMediaType) -> [AVAssetTrack]