NSExtensionContext openURL does not work with OS X Today extension

I want to call my application on my OSX Today Extension. This is the code I use for testing:

NSURL *appURL = [NSURL URLWithString:@"http://www.google.com"];    
NSAssert(self.extensionContext != nil, @"extension context is nil");
[self.extensionContext openURL:appURL completionHandler:^(BOOL success) {
    NSLog(@"opened successfully: %@", success ? @"YES" : @"NO");

}];

Its called when the user runs the double NSTableView action. I was not sure if I used the URL correctly for my application, so I installed it on Google for testing. The fact is that the completion handler is not called, so I assume that blocking it blocks it.

Do I need to indicate anything in the sandbox capabilities for this, or anything else that I should check?

+4
source share

All Articles