Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4333440
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:23:38+00:00 2026-05-21T10:23:38+00:00

I need to download an .mp3 audio file from a server to save in

  • 0

I need to download an .mp3 audio file from a server to save in my app and play it without downloading, exactly like the screenshot below, with a progress bar for the download (I found this in the App Store). Can anyone help me to do this in my app, with source code?
Any help will be appreciated! Thanks in advance!

I used NSURLConnection but it does not really work for me.

Here is the screenshot of what I am trying to do.

Screenshot of download with progress bar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:23:39+00:00Added an answer on May 21, 2026 at 10:23 am

    This questions discusses what you’re looking for

    Edit:

    If you want to download a file THEN play it, what you need to do is:

    use an NSURLConnection to download the file to the disk – this link discusses saving large files (i wouldn’t keep 2-5mb’s in the memory when i don’t need them even thought it will probably work).

    , than an AVAudioPlayer to play it – check this out.

    Edit 2:

    For the cancel button, it should practically just call the [NSURLConnection cancel] method and do whatever other finishing up your download class is gonna need…

    For the progress bar, in the NSURLConnectionDelegate method didReceiveResponse, you take the NSURLResponse, cast it to a NSHTTPURLResponse, and retrieve the size of the file you’re downloading using the expectedContentLength method.

    And then in each call to the NSURLConnection:didRecieveData method you count the incoming bytes using [data length] method, divide it by the expectedContentLength from the previous URL response and that’s the float the represents your progress that you pass to the progress view’s progress property

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to download a mp3 file from a server URL, and then play
I need to download a .mp3 or .m4a file from the server by using
I need to download file from FTP server and make some changes on it
i need to download a mp3 file from internet through my application and i
hello friends I need to download mp3 file from the internet and to store
Need to login and download xml file from the below url : http://www.radionyhetene.net/download/nyheter/mp3/nyheter.xml I
I need to download an image from some URL to my server. However, my
I need to download one file from an url that i give from an
i need to upload audio file(or any File) in server. i have asp.net server
I need to download Base64 Encoded data from Server using HttpUrlConnection. And then decode

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.