I need to know whether my app is brought to foreground through interaction with a push notification or manually by a users click on the app.
If you open an app from the background manually "applicationWillEnterForeground" is called. If you open the app from the background through a push notification, "applicationWillEnterForeground" is called, followed by "didReceiveRemoteNotification".
Now i want to make an alamofire request inside of the app delegate to my backend, whenever i am certain that it was opened due to push or not (statistics, do users interact with our push messages).
Is there a method that is called after all those i listed up? If so i could in that place check if it was a push or not and send it away. Or is there a better way to tackle this?