I’m receiving songs url from xml and saving them in sqlite as binary data.
Now I want to play those songs in AVAudioPlayer.
How would I achieve this?
Is this method is right for playing binarydata of song in AVAudioPlayer.?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Please have a look at this post:
AVAudioPlayer with external URL to *.m4p
AVAudioPlayer only works with local URL’s. It must be a File URL (file://)
See Apple’s Technical Q&A QA1634
You could get your binary data and write it to a file and then play it: