I am working on a new iphone sound application.
When I open the application, the audio loads and starts. If I press the iphone button to “minimize” the application, the sound was stopped. I need a sound playing in the background.
How am i doing this?
thanks
To play in the background, add an array entry called "UIBackgroundModes" to your .plist file and add "audio" as an element of the array.
.plist:
UIBackgroundModes Array Item0 String audio
Try also a look at AVAudioSession.
AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayback error:nil]; [session setActive:YES error:nil];
This should help.
Source: https://habr.com/ru/post/943690/More articles:Sublime Text 2 Adding 1 column to another - appendIs it good to print / write in global object constructor or undefined behavior? - c ++Split an array into an additional array in Ruby - pythonIOS: playing sound in the background - iosWhat is the fastest way in R to calculate the maximum rolling speed with a variable rolling window size? - rUsing services and DAO in spring mvc controller - javaDo I need a service object? - javaHow to add a code to the message before each return? - javaProviding a keystore to a webService client - eclipseunserialize Error at offset 5 out of 9 bytes - arraysAll Articles