Re: Issues with applications running on background (Alarm Application)
Re: Issues with applications running on background (Alarm Application)
- Subject: Re: Issues with applications running on background (Alarm Application)
- From: Fritz Anderson <email@hidden>
- Date: Wed, 17 Dec 2014 11:18:25 -0600
> On Dec 16, 2014, at 9:55 PM, Claudio Maximiliano Edison Bastos Iorio <email@hidden> wrote:
>
> soundName property is OK, and allows to use any embedded sound. But there’s no way to load any custom view dispatched right from the LocalNotification, at least no with a previous user interaction.
>
> I’ve just found UIApplication’s beginBackgroundTaskWithExpirationHandler, who allows me to run a background task.
> Based on Apple, the purpose of this background task is for instance to complete a server request when the app goes to background.
>
> I still need to check if this is a proper solution, however, I wonder if Apple will allow me to use this task to keep my Application running on the background. Do you guys have any idea about that?
You should study the documentation again, taking care against confirmation bias. beginBackground… really is for brief completions. iOS will allow you ten minutes at most. You are subject to eviction at any time before, so you must structure your task to tolerate its not completing. Within those constraints, you can do whatever you like in that time.
If it's a matter of a download, which I gather it isn't, look at the NSURLDownload family.
Apple lets you claim an exemption for specific tasks like VOIP or audio, but that doesn't help you. Look them up.
There is no leeway for any other exemption.
― F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden