I think maybe there is a error in the finished challenge playground. In the method URLSession:dataTask:didReceiveData: , the data should append.
so my english not very good, i just think so
hi, thanks for your question! it helps to show the difference between the delegates for data task and download task.
A data task usually downloads a small amount of data, which is stored in memory, so
didReceiveData receives all of it, then just saves it somewhere in the app.
A download task’s data can be very large, so it’s stored in a file while it downloads. The system calls the delegate method
didWriteData in HalfTunes whenever it appends more data to this file.
Incase any newbies get hung up: need to remove
trackIndex method on APIManager in order to be accessed from