self.extensionContext!.openURL 打开应用程序但未调用任何方法

self.extensionContext!.openURL open app but calls no method

我正在尝试使用以下代码将 Today 扩展连接到我的应用程序:

override func tableView(tableView: UITableView, accessoryButtonTappedForRowWithIndexPath indexPath: NSIndexPath) {
    let selection=busCollection[indexPath.row];
    let palina=selection?.palina;
    let urlAsString = "widget://pathto/" + "\(palina)"
    let url = NSURL(string: urlAsString)
    self.extensionContext!.openURL(url!, completionHandler: { (success: Bool) -> Void in
            print("completed")
        }
    )
    tableView.deselectRowAtIndexPath(indexPath, animated: false)
}

然而激活该方法正确打开了我的应用程序,但在没有调用的情况下以标准方式启动它:

-(BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url

可能是什么问题?当然,我在 info.plist 文件中注册了我的小部件,否则该应用程序可能甚至无法打开。

它最终调用了委托方法。