FDWaveformView icon indicating copy to clipboard operation
FDWaveformView copied to clipboard

adding support for visionOS?

Open ManjitBedi opened this issue 1 year ago • 2 comments

Hi,

I am exploring taking an existing iOS app & building it for visionOS to be able to add specific features like RealityKit.

When I build for "Apple Vision Pro" using a Swift package, I get the following error in func load(fromAudioURL audioURL: URL, completionHandler::

SourcePackages/checkouts/FDWaveformView/Sources/FDWaveformView/FDAudioContext.swift:32:38: error: 'tracks(withMediaType:)' is unavailable in visionOS
        guard let assetTrack = asset.tracks(withMediaType: AVMediaType.audio).first else {
                                     ^~~~~~
AVFoundation.AVAsset:17:15: note: 'tracks(withMediaType:)' has been explicitly marked unavailable here
    open func tracks(withMediaType mediaType: AVMediaType) -> [AVAssetTrack]

Building for "Apple Vision Pro(Designed for iPad)" still works.

ManjitBedi avatar Jul 19 '24 18:07 ManjitBedi

Hmm, I don't see this as deprecated. This seems like a framework that should be available across macOS/iOS/visionOS.

fulldecent avatar Aug 12 '24 13:08 fulldecent

Hello, here is a screen grab for the Apple developer docs:

Screenshot 2024-08-12 at 10 23 16 AM

https://developer.apple.com/documentation/avfoundation/avfragmentedasset/1387253-tracks

ManjitBedi avatar Aug 12 '24 17:08 ManjitBedi