2

I have a application which tries to grab location of user using silent notification at certain situations. I am able to send silent notification to the phones and able to run the background fetch and get the location back to web-service.

Comparing the user payload of silent notification I am doing some operation(Initiating the location manager & grabbing location from delegate method) while app is in background/suspended mode. This works in all other cases expect one case which is iPhone Power off & turn back ON case.

Problem: According to my observations, Once after phone got power off & turned back ON, The silent notification is being received by iPhones(I confirm this because I hear the sound because I gave sound in payload) but the operation is not happening.

  1. Do any one have better understanding how iPhone behaves once after turned-on. will it do the operation after receiving the silent notification ?
  2. Does code run anything after phone receiving the silent notification ?
  3. I also tried to save the value in UserDefaults before phone getting power off and the value becomes nil after we turned on the power.

Your help, greatly appreciated..!

Karen
  • 169
  • 1
  • 16

0 Answers0