Skip to content

Instantly share code, notes, and snippets.

@randydailey
Last active December 18, 2015 16:29
Show Gist options
  • Select an option

  • Save randydailey/5811505 to your computer and use it in GitHub Desktop.

Select an option

Save randydailey/5811505 to your computer and use it in GitHub Desktop.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateActive)
{
// Recieved a notification while the app was already open. May want to record seperately or ignore
}
else
{
// Recieved notification while in background. Tag this as if it came from a cold start
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment