Search code examples
objective-ciosoauthoauth-2.0gdata

ios gtm-oauth no keyboard


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!


Solution

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

    [self.window makeKeyAndVisible];