tumtumtum / StreamingKit

A fast and extensible gapless AudioPlayer/AudioStreamer for OSX and iOS (iPhone, iPad)
Other
2.42k stars 525 forks source link

Deprecation around CFNetwork #424

Open diegostamigni opened 5 years ago

diegostamigni commented 5 years ago

Some of the API in CFNetwork have been deprecated since macOS 10.11+. We can sort this out by replacing them accordingly with the ones from NSURLSession.

diegostamigni commented 5 years ago

Also duplicates of #266

tumtumtum commented 5 years ago

IIRC NSURLConnection has its own issues hence why I went down the lower level path. Tread carefully?

diegostamigni commented 5 years ago

yeah @tumtumtum ... thing is, all these Xcode warnings suggest to replace those CFNetwork constants with NSURLSession:

but really there isn't a replacement hence I was thinking of rewriting the whole STKHTTPDataSource to make usage of NSURLSession instead (with back compatibility [probably just an additional data source and swap based on SDK/runtime version, similar to what I've done in #423 for OSSpinLock]) though I'm not sure we can read stream the way we do with CFNetwork 🤔 (haven't look at it yet).