GTL Framework构建错误与XCode 7和部署目标10.10

时间:2015-09-28 05:01:26

标签: ios objective-c google-app-engine xcode7

我试图在XCode 7中使用Google-api-objectivec-client-read-only构建GTL项目,部署目标为10.10。我在GTMOAuth2WindowController.m文件中看到以下构建错误

将GTMOAuth2WindowController发送到不兼容类型的参数' id @ line [self.webView setResourceLoadDelegate:self];

和 将GTMOAuth2WindowController发送到不兼容类型的参数' id @ [self.webView setPolicyDelegate:self];

以下是方法块

-

 (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];
  }

非常感谢任何帮助。

谢谢!

1 个答案:

答案 0 :(得分:2)

我已经解决了

的问题
[self.webView setResourceLoadDelegate:self];
[self.webView setPolicyDelegate:self];

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

我添加了演员(看Sending Class to Parameter of Incompatible Type 'id<UIWebViewDelegate>' Warning?) 再见