Michael Rahr
Michael Rahr

Reputation: 61

How to detect if an IOS app is killed, when it is not in forground. IOS7

I know this question has been asked before, and it is stated that it cant be done. But the APP called Këvo does this, so even if the app is in the background and the user kills it, a notification will be shown, I have tried to use localnotification, but I cant get it to work if the app is put into the background first, works fine, it app is just killed while in the foreground.

Just to clarify, the kevo key, uses BTLE in the background, advertising some btle stuff, if the user remove the app, they will notify the user that the app will not work anymore, and the door lock will not open, when you approach the door, I kind of like that notification, It is quite relevante.

Br. Michael Rahr

Upvotes: 0

Views: 1572

Answers (2)

Steve Jabs
Steve Jabs

Reputation: 49

My name is Steve Jablonski, I am the mobile engineer for Kevo.

You're on the right track using local notifications. We have integrated ours like this:

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Announce App Warning
    UILocalNotification *notification = [[UILocalNotification alloc] init];
    notification.fireDate = [[NSDate date] dateByAddingTimeInterval:1];
    notification.alertBody = @"Your app has been shut down.";
    [[UIApplication sharedApplication] scheduleLocalNotification:notification];
}

Hope that helps!

Upvotes: 4

ScottMcGready
ScottMcGready

Reputation: 1622

Perhaps the app maintains constant communication with the server (HTTP) and when it dies, it sends a push notification?

Local notification on dying is impossible... at the moment.

Upvotes: 0

Related Questions