I have a method which handles a Apple Push Notification Service
remote notification. When this method is executed, I want it to call my server and do a HTTP POST
request using the Alamofire
library. I want to execute another method that will handle the response of the POST request.
The problem for me is that I am using an existing API
to fetch a profile from the server in this POST request. So I need to use this existing API and figure out when this profile fetch is specifically triggered from the remote notification.
Since Alamofire
requests are done in a background queue, how would I go about doing an execution of a method after receiving the profile back from the server?
What would be a good option to solving this issue?
Thank you!