Handoff icon not disappearing from the phone

197 views Asked by At

I create a handoff request for my apple watch app with the following code:

[self updateUserActivity:@"..." userInfo:selectedTopic webpageURL:[NSURL URLWithString:nil]];

And I handle the request in the phone AppDelegate with the following code:

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler
{
    BOOL handled = NO;
    [userActivity becomeCurrent];
    NSString *type = [userActivity activityType];
    NSDictionary *userInfo = [userActivity userInfo];
    if ([type isEqualToString:@"..."]) {
        //does action
        [userActivity invalidate];
        handled = YES;
    }
    return handled;
}

The issue is the handoff icon does not go away even though this code is executed. What am I doing wrong here? Why will the handoff icon not disappear?

I've seen this behaviour on other applications. The only applications I see with the correct behaviour are native apps.

0

There are 0 answers