Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, this has actually changed after the question was initially answered. </p> <p>There are currently at least two ways for a closed application to play a sound or a popup.</p> <ol> <li><p>An app can register for a Local Notification while it is running, that will be called at a future time even if the app is closed. The notification will display a popup and optionaly play a sound or set a badge on an application's icon. Implementing this is easy:</p> <pre><code> id localNotif = [[NSClassFromString(@"UILocalNotification") alloc] init]; if (!localNotif) { return; } [localNotif setTimeZone:[NSTimeZone defaultTimeZone]]; [localNotif setAlertBody:NSLocalizedString(@"Hello!",nil)]; [localNotif setAlertAction:NSLocalizedString(@"Hello", nil)]; [localNotif setSoundName:UILocalNotificationDefaultSoundName]; [localNotif setFireDate:[[NSDate date] addTimeInterval:(60*60)]]; [localNotif setFireDate:[[NSDate date] addTimeInterval:(24*60*60)]]; [[UIApplication sharedApplication] scheduleLocalNotification:localNotif]; [localNotif release]; </code></pre></li> <li><p>An app (with the user's permission) can register itself with a remote server (yours or a service provider) to receive push notifications delivered to it from you (via Apple's system). Once received, the App will optionally display a popup, play a sound, and/or change the badge on an applications icon. There is sample code in the Apple documentation for implementing the iPhone side of this, and also a few open source projects floating around for the server side. You can bypass having to implement your own server side by using a service like Urban Airship.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload