首先参照:
http://blog.csdn.net/aini9080/article/details/39926649
基础步骤 ,部署Today Extension
这样就相当于两个Target BundleID需要注意 如下图 ,两个要不同,如果用到 Group 需要
?、、、developer.apple.com、、、、
Application Services:
两个都要添加
重要,但是不要改就OK了
在主ViewControler 添加
NCWidgetController *lol = [[NCWidgetController alloc] init];
[lol setHasContent:NO forWidgetWithBundleIdentifier:@"主bundleID"];
在Today Extension 返回主vc
NSExtensionContext *context = [self extensionContext];
[context openURL:[NSURL URLWithString:@""主URL Schemes://"] completionHandler:^(BOOL success) { }];