func application(application: UIApplication, didReceiveRemoteNotification data: [NSObject : AnyObject]) {
var dat = JSON(data)
if application.applicationState == UIApplicationState.Active {
// app was already in the foreground
println("App is in foreground")
processNotification(dat)
}else{
// app was just brought from background to foreground via PUSH
println("App brought back via PUSH")
processNotification(dat)
}
}
So überprüfe ich nach Push-Benachrichtigungen. Wenn ich jedoch eine Push-Benachrichtigung sende, verfehlt der Benutzer diese und öffnet dann die App über das Symbol? Wie kann ich überprüfen, wann die App über das Symbol geöffnet wurde?Wie kann ich überprüfen, wenn eine App aus dem Hintergrund in den Vordergrund rückt, aber nicht von einer Push-Benachrichtigung?
Sie meinen, wie zu erkennen, ob die App geöffnet ist, aber es ist eine ungeöffnete Benachrichtigung hängen? – Simon
@Simon ja, ich denke schon. – TIMEX