ios gtm-oauth 没有键盘

发布于 2025-01-06 09:26:42 字数 829 浏览 4 评论 0原文

我正在尝试使用 gtm-oauth 套件(http://code.google.com/p/gtm-oauth/wiki/GTMOAuthIntroduction)进行 OAuth2。按照文档的指示 - 我已在 XCode 4 中的项目中包含了所有必需的文件和代码。运行应用程序后,会出现登录屏幕,但是当我单击字段(用户名或密码)时,键盘无法显示。我已经在我的项目中移动了代码,包括尝试从应用程序委托运行所有代码,如下所示:

GTMOAuth2ViewControllerTouch *viewController;
viewController = [[[GTMOAuth2ViewControllerTouch alloc] initWithScope:@"https://www.googleapis.com/auth/latitude.all.best" clientID:@"<MY_CLIENT_ID>" clientSecret:@"<MY_CLIENT_SECRET>" keychainItemName:@"App" delegate:self finishedSelector:@selector(viewController:finishedWithAuth:error:)] autorelease];
[self.window addSubview:viewController.view];

我尝试将范围更改为包括纬度和 youtube 在内的替代服务,但这没有帮助。我还尝试将视图推入导航控制器并尝试在模型中呈现,但这些都没有帮助。

奇怪的是,我尝试在网页上单击并设法访问 images.google.com,在那里我可以通过单击搜索栏成功启动键盘...奇怪:/

任何帮助将不胜感激!谢谢!

I am trying to use the gtm-oauth kit (http://code.google.com/p/gtm-oauth/wiki/GTMOAuthIntroduction) for OAuth2. As instructed by the documentation - i have included all the necessary files and code in my project in XCode 4. Once i run the application, the login screen appears, but when I click a field (username or password) the keyboard fails to show. I have moved the code around in my project including attempting to run all from the app delegate as follows:

GTMOAuth2ViewControllerTouch *viewController;
viewController = [[[GTMOAuth2ViewControllerTouch alloc] initWithScope:@"https://www.googleapis.com/auth/latitude.all.best" clientID:@"<MY_CLIENT_ID>" clientSecret:@"<MY_CLIENT_SECRET>" keychainItemName:@"App" delegate:self finishedSelector:@selector(viewController:finishedWithAuth:error:)] autorelease];
[self.window addSubview:viewController.view];

I have tried to change the scope to alternative services including latitude and youtube but this has not helped. I have also attempted to push the view into a navigation controller and attempted to present in a model, these have not helped.

Strangely, i tried clicking around in the web page and managed to get to images.google.com, where i could successfully launch the keyboard by clicking the search bar... strange :/

Any help would be appreciated! Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

滿滿的愛 2025-01-13 09:26:42

嗯,你确定你的应用程序委托中有这个吗?

[self.window makeKeyAndVisible];

Hmm, have you made sure you have this in your app delegate?

[self.window makeKeyAndVisible];
客…行舟 2025-01-13 09:26:42

我在关注 google oauth2 教程时遇到了这个问题。我通过制作基于 ap 导航并推送 GTMOAuth2ViewControllerTouch 解决了这个问题。

I had this problem while i was following googles oauth2 tutorial. I solved it my making the ap navigation based and pushing the GTMOAuth2ViewControllerTouch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文