title: iOS Local Notifications with an API call
body: <p>I am trying to create a local notification with the following requirements:</p>
  
  <ul>
  <li>The user sets the days of the week for the notification</li>
  <li>The user selects the time of day for the notification</li>
  <li><strong>The message of the notification requires calling an API to get the content.</strong></li>
  </ul>
  
  <p><em>For example, the user wants to know what the traffic is like on their commute every weekday at 0800.</em> </p>
  
  <p>There are some great tutorials on creating Local Notifications (like this one <a href="http://www.appcoda.com/ios-programming-local-notification-tutorial/" rel="nofollow">Adding Local Notifications in Your iOS App - appcoda</a>), but I would like to know if I can make an API call to populate the message of the notification.</p>
  
  <p>So rather than having an annoying "<em>Check out the traffic now</em>" notification which can quickly direct the user to the relevant page in my app, I would like to have: "<em>There is minor congestion on the {road}</em>" or "<em>The roads look clear right now</em>"</p>
  
  <p>Is this at all possible? Thanks.</p>
  
  <hr>
  
  <p><strong>EDIT: Post iOS7 release</strong></p>
  
  <p>So it seems we have;</p>
  
  <ul>
  <li>Background Fetch - able to fetch the new content and keep the content up-to-date</li>
  <li>Remote Notifications - able to download the content when the app receives the push notification</li>
  </ul>
  
  <p>Neither of these work in my scenario. I need to make a call as close to the user's specified time as possible. With background fetch, it is no use if the last update was at 5am when the roads were probably clear. Remote notifications are not ideal either as I am not pushing a notification, I would be displaying a local notification.</p>
  
  <p>Does anyone know of a clever workaround to achieve this solution?</p>