Question

I am working on an online radio and it works fine ...but gets problem when user received a call.
when call finishes i start the radio automatically.by using AVAudioSessionDelegate.

Now radio is playing and if user open the app(moving it to foreground) and press that stop/play button again my app goes crashes. I might know the reason,the reason may be due to threading.But i am unable to handle this please provide some help.(can't put the code it is huge and private)

No correct solution

OTHER TIPS

To prevent crash when your app goes in background and comes in foreground, call the pause button of radio app in background and releases threads. when user touches the play button it it will start threading. Try it,hopes it may work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top