0

I'm trying to build GTL project from Google-api-objectivec-client-read-only in XCode 7 with deployment target 10.10. I see the following build errors in GTMOAuth2WindowController.m file

Sending GTMOAuth2WindowController to parameter of incompatible type 'id @ line [self.webView setResourceLoadDelegate:self];

and Sending GTMOAuth2WindowController to parameter of incompatible type 'id @ [self.webView setPolicyDelegate:self];

Following is the method block

-

 (void)awakeFromNib {
  // load the requested initial sign-in page
  [self.webView setResourceLoadDelegate:self];
  [self.webView setPolicyDelegate:self];

  // the app may prefer some html other than blank white to be displayed
  // before the sign-in web page loads
  NSString *html = self.initialHTMLString;
  if ([html length] > 0) {
    [[self.webView mainFrame] loadHTMLString:html baseURL:nil];
  }

Any help would greatly be appreciated.

Thanks !!

NoNaMe
  • 6,020
  • 30
  • 82
  • 110
raja
  • 31
  • 1
  • 4

1 Answers1

2

I've resolved replacing

[self.webView setResourceLoadDelegate:self];
[self.webView setPolicyDelegate:self];

with

[self.webView setResourceLoadDelegate:(id<WebResourceLoadDelegate>)self];
[self.webView setPolicyDelegate:(id<WebPolicyDelegate>)self];

I've added a cast (look at Sending Class to Parameter of Incompatible Type 'id<UIWebViewDelegate>' Warning?) Bye

Community
  • 1
  • 1
Brianenno
  • 51
  • 9