i just implement push notification in my application. issue : while my application is off and i got push notification and when i clicked on it. i want to call one api so i want to know that by which method i can handle this. Note: the main thing is app in closed state.
here is my code
if (application.applicationState == .Active)
{
print("Active")
}
else (application.applicationState == .Inactive)
{
print("InActive")
}
but this code is only working when my app is active or iactive. how can i do this when my app is totally closed.