title: Re-send local notification in case of error
body: <p>In our app, we send scheduled local notifications as reminders. There's a button on the notification to mark the reminder as completed. When we handle the local notification, we send an API request to mark the reminder as completed.</p>
  
  <p>In the case of the HTTP request failing, we would like to re-send the local push notification for two reasons: 1) that the user knows the original action failed, 2) so that they can retry.</p>
  
  <p>We tried sending a local notification in the <code>application:handleActionWithIdentifier:for:completionHandler</code> callback. We schedule the retry notification for ~5 seconds from the present time. It works on the simulator, but it doesn't work on an actual device.</p>
  
  <p>I have tried adding <code>application.beginBackgroundTaskWithName("showNotification", nil)</code> in the app's <code>application:didFinishLaunchingWithOptions:launchOptions</code> method, and this does make it work on the device. However, I am concerned that it is not a robust solution. Our reminder notifications can be sent at any time of the day and the documentation for <code>beginBackgroundTaskWithName</code> says that it only works temporarily.</p>
  
  <p>So my question is: Is there really no way to re-send a local notification on iOS? On the other hand, if there is, how can I do it?</p>