Xcode 7,Swift 2中的Gmail API iOS [英] Gmail API iOS in Xcode 7, Swift 2

查看:117
本文介绍了Xcode 7,Swift 2中的Gmail API iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注Google的教程 https://developers.google.com/gmail/api/quickstart/ios?ver = swift 创建一个简单的Swift项目,但编译器抛出以下错误.这是由于Xcode 7,Swift 2中的某些更改引起的吗?知道如何解决

I am following Google's tutorial https://developers.google.com/gmail/api/quickstart/ios?ver=swift to create a simple Swift project but compiler throws below error. Is this due to some changes in Xcode 7,Swift 2 ? Any idea how to fix it

Undefined symbols for architecture arm64:
  "_OBJC_METACLASS_$_GTLService", referenced from:
      _OBJC_METACLASS_$_GTLServiceGmail in GTLGmail_Sources.o
     (maybe you meant: _OBJC_METACLASS_$_GTLServiceGmail)
  "_OBJC_CLASS_$_GTMOAuth2ViewControllerTouch", referenced from:
      type metadata accessor for ObjectiveC.GTMOAuth2ViewControllerTouch in ViewController.o
  "_OBJC_METACLASS_$_GTLObject", referenced from:
      _OBJC_METACLASS_$_GTLGmailDraft in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailHistory in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailHistoryLabelAdded in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailHistoryLabelRemoved in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailHistoryMessageAdded in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailHistoryMessageDeleted in GTLGmail_Sources.o
      _OBJC_METACLASS_$_GTLGmailLabel in GTLGmail_Sources.o
      ...
  "_OBJC_METACLASS_$_GTLQuery", referenced from:
      _OBJC_METACLASS_$_GTLQueryGmail in GTLGmail_Sources.o
     (maybe you meant: _OBJC_METACLASS_$_GTLQueryGmail)
  "_OBJC_CLASS_$_GTLService", referenced from:
      _OBJC_CLASS_$_GTLServiceGmail in GTLGmail_Sources.o
     (maybe you meant: _OBJC_CLASS_$_GTLServiceGmail)
  "_OBJC_CLASS_$_GTLQuery", referenced from:
      _OBJC_CLASS_$_GTLQueryGmail in GTLGmail_Sources.o
     (maybe you meant: _OBJC_CLASS_$_GTLQueryGmail)
  "_OBJC_CLASS_$_GTLObject", referenced from:
      _OBJC_CLASS_$_GTLGmailDraft in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailHistoryLabelAdded in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailHistoryLabelRemoved in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailMessage in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailHistoryMessageAdded in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailHistoryMessageDeleted in GTLGmail_Sources.o
      _OBJC_CLASS_$_GTLGmailHistory in GTLGmail_Sources.o
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

推荐答案

将Gmail API更新到最新版本可解决此问题.

Updating Gmail API to latest version fixes this issue.

这篇关于Xcode 7,Swift 2中的Gmail API iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆