我首先在我的应用程序上实现了gtm-oauth2,用谷歌测试OAuth登录。然后,由于我需要访问Google,我删除了gtm-oauth2并安装了google objectivec-client。现在,我得到以下错误:
2015-02-25 17:10:10.782 Reset[17368:76612] Invalid parameter not satisfying: windowNibPath我正在使用以下代码(我尝试使用obj-c,得到了相同的错误):
let controller = GTMOAuth2WindowController(
scope: "https://www.googleapis.com/auth/calendar",
clientID: "aze",
clientSecret: "aze",
keychainItemName: "aze",
resourceBundle: nil
)
controller.signInSheetModalForWindow(mainWindow, completionHandler: { (auth: GTMOAuth2Authentication!, error: NSError!) -> Void in
Context.shared.user.auth = auth
})我试着理解为什么从两天开始。知道吗?
编辑:我有创造了一个回购,它复制了错误。
发布于 2015-03-04 00:31:35
必须修改文件OAuth2/Mac/GTMOAuth2WindowController.m行117-118
NSString *nibPath = [bundle pathForResource:nibName ofType:@"nib"];
self = [super initWithWindowNibPath:nibPath owner:self];通过
self = [super initWithWindowNibName:nibName owner:self];看起来像库的使用和旧方式的init窗口。希望这能帮上忙。
https://stackoverflow.com/questions/28725395
复制相似问题