0

Working on a solution When a push notificaiton is received in iOS, the client app should acknowledge the server that the message is delivered. To achieve this i should call an acknowledge API when a notification is received in iOS app so when the app state is closed, but not in background/active. Need to know which method is triggered and how could i call the API without opening the app. I'm using background mode as well.

Able to call the API for active/background state but not inactive.

Please help me out.

BharathBob
  • 699
  • 5
  • 11
  • You should clarify the states you are referring to; An app can be active, suspended, executing in the background or terminated. An app can move to background execution from the suspended state in response to a push message, but if the app is terminated then it cannot execute any code in response to a push message. – Paulw11 Nov 09 '18 at 09:32
  • As i said, the app is closed/dead state, not in background, i need to trigger an api call when a notification arrives, acknowledge the server that the particular notification or message is received on client end. – BharathBob Nov 09 '18 at 11:08
  • If you mean "not running" (Refer to [figure 2.3](https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html), then you cannot run any code, since the app is not running. – Paulw11 Nov 09 '18 at 11:10

0 Answers0