我只需通过cocoa app在Safari上加载URL。如果假设我的网址是安全的,我想要打开网址,并提供钥匙串访问中可用的证书。如何使用(在keychain访问中提供)证书在safari上加载url。现在我手动选择,同时在safari证书选择上加载url时会多次询问但是没有加载
我的代码是:
NSURL *url = [NSURL URLWithString:@“http://www.google.com”];
NSDictionary *theProperties = [NSDictionary dictionaryWithObject:url forKey:@"URL"];
SafariApplication* sfApp = [SBApplication applicationWithBundleIdentifier:@"com.apple.Safari"];
SafariDocument *doc = [[[sfApp classForScriptingClass:@“document"] alloc] initWithProperties:theProperties];
[[sfApp documents] addObject:doc];
谢谢:)