FDWaveformView
FDWaveformView copied to clipboard
adding support for visionOS?
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.
Hmm, I don't see this as deprecated. This seems like a framework that should be available across macOS/iOS/visionOS.
Hello, here is a screen grab for the Apple developer docs:
https://developer.apple.com/documentation/avfoundation/avfragmentedasset/1387253-tracks