Trying to add offline HLS (a new ios 10 feature) to an app. I'm trying the following in swift in order for the app to still function on ios 9 without the offline HLS Functionality. Works fine on ios10 and compiles for ios9 too.
@available(iOS 10.0, *)
@objc class DownloadManager: NSObject, AVAssetDownloadDelegate {
//Do stuff with downloading assets
}
However, when I actually run this on a ios 9 device, the app crashes immediately with the following message :
dyld: Symbol not found: _OBJC_CLASS_$_AVAssetDownloadTask Referenced from: /var/mobile/Containers/Bundle/Application/7062C410-C4F5-4270-9F1E-22750E99F799/wod.app/wod Expected in: /System/Library/Frameworks/AVFoundation.framework/AVFoundation in /var/mobile/Containers/Bundle/Application/7062C410-C4F5-4270-9F1E-22750E99F799/wod.app/wod
I've constrained all code related to this to the DownloadManager class so i dunno what to do next. Thanks!