multitasking

Sprite Kit & playing sound leads to app termination

一曲冷凌霜 提交于 2019-11-26 04:45:55
问题 using ARC Just a problem I\'ve run into- I have an SKScene in which I play a sound fx using SKAction class method [SKAction playSoundFileNamed:@\"sound.wav\" waitForCompletion:NO]; Now when I try to go to background, no matter that the sound was over, apparently iOS is terminating my app due to gpus_ReturnNotPermittedKillClient . Now only when I comment this line and not running the action iOS runs it great in background (of course, paused, but without termination). What am I doing wrong?

How to handle background audio playing while iOS device is locked or on another application?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 03:55:08
问题 Designing a generative music system for iOS, using OpenFrameworks, I\'d need to provide a mode in which the user could listen the music produced by the application when: the device is locked the user uses another application Some applications like BLOOM, or alarm clock, works like that and propose to users a switch to enable/disable this feature. Any tips for that ? 回答1: Playing Background Audio An app that plays or records audio continuously (even while the app is running in the background)

Proper use of beginBackgroundTaskWithExpirationHandler

梦想与她 提交于 2019-11-26 03:28:57
问题 I\'m a bit confused about how and when to use beginBackgroundTaskWithExpirationHandler . Apple shows in their examples to use it in applicationDidEnterBackground delegate, to get more time to complete some important task, usually a network transaction. When looking on my app, it seems like most of my network stuff is important, and when one is started I would like to complete it if the user pressed the home button. So is it accepted/good practice to wrap every network transaction (and I\'m

Handling applicationDidBecomeActive - “How can a view controller respond to the app becoming Active?”

痞子三分冷 提交于 2019-11-26 03:25:05
问题 I have the UIApplicationDelegate protocol in my main AppDelegate.m class, with the applicationDidBecomeActive method defined. I want to call a method when the application returns from the background, but the method is in another view controller. How can I check which view controller is currently showing in the applicationDidBecomeActive method and then make a call to a method within that controller? 回答1: Any class in your application can become an "observer" for different notifications in the

Android singleTask or singleInstance launch mode? [closed]

别等时光非礼了梦想. 提交于 2019-11-26 03:03:20
I have an app that has a list as its main activity and then you can click items which opens a detailed view of that item. I also have a search activity that is similar to the main activity and works as intended. However I want this search activity to only have once instance on the stack so that users can search multiple times and clicking back would return them to the previouse view that they were on before they started searching (rather than go back to the previouse search results) both the singleTask and singelInstance launch mode seems to do what I want so Im not sure which one I should be

Android singleTask or singleInstance launch mode? [closed]

徘徊边缘 提交于 2019-11-26 01:12:58
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I have an app that has a list as its main activity and then you can click items which opens a