tags:

views:

25

answers:

1

I am new to iPhone apps, I am developing one application which requires playing audio songs in background that is if user exists the application also it has to playback the audio songs still user stops it. I have checked in this site for this feature but some guy gave answer that this feature is owned by Apple people for their apps before iOS4 but I found one application named "Raaga Telugu" in itunes having this same feature but still working in iOS3.0 also.

some one please help me, some help would be appreciated.

A: 

You can not do this in iOS 3.x.

From Apple's iPhone App Programming Guide, Chapter 4 "Preparing Your Application to Execute in the Background", Section 2 "Declaring the Background Tasks You Support":

Support for some types of background execution must be declared in advance by the application that uses them. An application does this by including the UIBackgroundModes key in its Info.plist file. This key identifies which background tasks your application supports. Its value is an array that contains one or more strings with the following values:

audio - The application plays audible content to the user while in the background.

Start by reading this document (at least this chapter) thoroughly.

Shaggy Frog
Thanks for response, I want to develop this application for both iPhone and iPad then for iPhone it's ok but for iPad(iOS 3.2) is there any alternative, shaggy can you please mention some procedure.
John Canady
On versions of iOS prior to 4.0, (non-Apple) applications do not run in the background. They either run in the foreground or not at all (e.g. when you hit the Home button, your app is terminated). If you want to create an iPad app capable of background processing of audio, you will probably need to wait until at least iOS 4.2... there will likely be more information given about the iPad's O/S roadmap tomorrow during the "media event"
Shaggy Frog