Does iOS cache remote notifications for apps that are running in background? -


official document apple developer network mentions payload of push notification provided application when it’s running in foreground, or when it’s activated because of push notification. cannot find statement happens when app running in background.

i did test instant message application, , found not understand. procedure of test is:

  1. enable push notification app
  2. switch app background
  3. send 2 ims client. 2 push notification arrives @ client , badge on app's icon becomes 2
  4. shut down cellular network prevent app communicating server
  5. click app icon switch foreground

after these steps, can see 2 messages in chat window. because app not able retrieve messages directly server, explanation push notifications processed app when it’s in background, or cached somewhere , can accessed app when it's switched foreground. ios allows app execute codes when it’s in background, or cache notifications apps?

the application caches notifications 2-5 minutes(i don't know exact) time..

if receive notification , open app in 2-5 minutes

then in app delegate

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions  {  } 

you have notification object .. can using launchoptions object key uiapplicationlaunchoptionsremotenotificationkey

if don't open within 2-5 minutes.. there no notification object,

this based on experience..cant totally support answer


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -