Using Xcode 14.0, iOS 16, Swift 5.7,
I get the following deprecation warning due to iOS 16:
'duration' was deprecated in iOS 16.0: Use load(.duration) instead
Here is my code:
var actualTime: CMTime = CMTimeMake(value: 0, timescale: asset.duration.timescale)
What do I need to change in order to get rid of this warning?
I tried:
var actualTime: CMTime = CMTimeMake(value: 0, timescale: asset.load(.duration).timescale)
But this makes everything async. Do I really need to go down that road?
async/await
is going upstairs. Please read developer.apple.com/documentation/avfoundation/media_assets/… – Undercool