Hi Jens, thanks for your response.

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?

Thanks in advance,


> On Dec 16, 2014, at 5:35 PM, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On Dec 16, 2014, at 11:49 AM, Claudio M. E. Bastos Iorio 
>> <selecter...@gmail.com <mailto:selecter...@gmail.com>> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to