Gmail API iOS 在 Xcode 7,Swift 2

Gmail API iOS in Xcode 7, Swift 2

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

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 更新到最新版本可解决此问题。