Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>in sign in you need to do this in the viewDidLoad</p> <pre><code>signIn.clientID = kClientId; signIn.shouldFetchGoogleUserEmail = YES; signIn.shouldFetchGoogleUserID = YES; signIn.scopes = [NSArray arrayWithObjects: kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h nil]; signIn.delegate = self; </code></pre> <p>then you need to do 1 of two options but not both.</p> <p>option 1: add the class <code>GPPSignInButton</code></p> <p>or</p> <p>option 2: add this <code>[signIn authenticate];</code> to some button</p> <p>then use the auth like this</p> <pre><code>- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth error: (NSError *) error { if (error) { // Do some error handling here. } else { GTLServicePlus* plusService = [[GTLServicePlus alloc] init]; plusService.retryEnabled = YES; [plusService setAuthorizer:auth]; GTLQueryPlus *query = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"]; [plusService executeQuery:query completionHandler:^(GTLServiceTicket *ticket, GTLPlusPerson *person, NSError *error) { if (error) { GTMLoggerError(@"Error: %@", error); } else { // Retrieve the display name and "about me" text NSString *description = [NSString stringWithFormat: @"%@\n%@", person.displayName, person.identifier]; } }]; } } </code></pre> <p>and your .h should be something like this</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import &lt;GooglePlus/GooglePlus.h&gt; #import &lt;GoogleOpenSource/GoogleOpenSource.h&gt; static NSString * const kClientId = @"yourappnumber.apps.googleusercontent.com"; @interface login : UIViewController&lt;GPPSignInDelegate&gt; @property (retain, nonatomic) IBOutlet GPPSignInButton *signInButton; @end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload