Local Notification Content From Web?

Discussion in 'iOS Programming' started by newtoiphonesdk, Jul 30, 2012.

  1. newtoiphonesdk, Jul 30, 2012
    Last edited: Jul 30, 2012

    newtoiphonesdk macrumors 6502a

    Jul 30, 2010
    I use BibleGateway.com to add some code to html in my website to provide a bible verse that changes each day. I display this in app by getting the innerText of the html and showing it in a TextView. I would like to allow local notifications to be fired at a time set by the user. Is it possible to fire the notification and have the content of the notification be whatever the current verse is?

    Basically local notification would get the text from the HTML and then display that?

    If it is or even if it isn't, is there a way to have the action of opening the local notification cause the app to open to the specific tab in the tab bar controller where the verse is displayed?
  2. Reason077 macrumors 68020


    Aug 14, 2007
    You can schedule local notifications to fire at some time in the future. However there's no way for your app to start up by itself and download content without the user doing it.

    I think in this case, if you want to include content that changes daily in the notification, you would need to send it from a server using push notifications.

    Yes, you can send whatever properties you like to your app as part of the notification payload. In local notifications, they are passed in the "userInfo" property of the UILocalNotification object.

Share This Page