iOS 与 OSX widget 调用host APP 区别

 NSString *customURL = @"XXXX://";

iOS

[self.extensionContext openURL:[NSURL URLWithString:customURL] completionHandler:^(BOOL success) {
        NSLog(@"open url result:%d",success);
    }];

OSX

 [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:customURL]];

参考地址(可能需翻墙): http://indiestack.com/2014/12/open-url-from-today-extension/

你可能感兴趣的:(iOS 与 OSX widget 调用host APP 区别)