objective c - How does the web version of Whatsapp work on iOS devices considering the OS shuts apps in 30 seconds? -


now don't know, can go https://web.whatsapp.com/ , sync whatsapp chats exchanging qr code , chat via web extension of app.

i not interested in how have initial handshake( might communicating whatsapp servers) nor how sync data fast chatting (might using open sockets directly device client).

i curious how app works in background on ios . afaik running background intent service pretty simple. not ios. ios allows 30 seconds after app shut down normally.

1) tried crashing app(swipe up) (still web version running normally)

2) disabled background app refresh web version didn't stop.

3) disable notifications still web version worked normally.

4) not have blue bar likes when google maps giving directions indicates app running in bg

5) using dummy geo fencing keep them alive? (but d require bg app refresh too)

is new feature on ios 8 introduced , not aware of

just side note, apple introduced notification service extension point in ios 10, can used achieve this. following applies ios 9.x or earlier.


no app in ios can long alive in background keep-alive socket, or guaranteed wake remote notifications except using voip background mode (ot: , iirc bluetooth background modes).

  • an app has ~5 seconds of runtime on applicationdidenterbackground: after being put in background, unless registered background modes or tasks. app terminated if runs out of time in delegate method.
  • the background task model mentioned @xoail has app-specific, system-imposed time limit (up 30 seconds...?) , cannot extended. app complete current work, e.g. uploading media, before being suspended. background transfer service, since ios 7.0, alternative long running file transfer.
  • silent remote notificaiton observed triggered consistently on charger , wi-fi, throttled ios otherwise. sort of indeterministic - let alone fact can switched off flipping app's background app refresh switch.
  • voip background mode (in ios 8 , later) guarantees call app's handler when voip notification received apns. app review guidelines states background modes should used intended purpose.

so either apple waives whatsapp use of voip background mode purpose other whatsapp call, or whatsapp happens away "use phone sync" architecture , new iphones.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -