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: Jens Alfke <email@hidden>
- Date: Tue, 16 Dec 2014 12:35:43 -0800
> On Dec 16, 2014, at 11:49 AM, Claudio M. E. Bastos Iorio <email@hidden> wrote:
>
> · I’ve started by using UILocalNotification, however, when my app
> goes to background, I’m receiving the scheduled Notification, as expected,
> but I didn’t find a way to load my custom image or playing the custom
> sound.
UILocalNotification has a soundName property. I don't know a way to set a custom image (is that possible?) but I'm not an expert on notifications; I just read through the header and looked at the available API.
> · I’ve also tried to use a NSTimer and iterate an array of alarms.
> This approach works while my application is on the forground. But as soon
> as it goes to background, the timer stops.
Right. That's not going to work, because your application stops running when it goes into the background. iOS does this to conserve battery power. Read Apple's documentation about the app lifecycle.
—Jens
_______________________________________________
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