在XCode中设置GoogleCastAPI

在XCode中设置GoogleCastAPI,xcode,chromecast,Xcode,Chromecast,我按照中所述的说明进行了操作,但当我尝试构建我的项目时,我发现36个链接器错误,如下所示: Undefined symbols for architecture i386: "_SSLClose", referenced from: -[GCK_GCDAsyncSocket closeWithError:] in GoogleCast(GCKAsyncSocketWrapper.o) "_SSLCreateContext", referenced from: -[

我按照中所述的说明进行了操作,但当我尝试构建我的项目时,我发现36个链接器错误,如下所示:

Undefined symbols for architecture i386:
  "_SSLClose", referenced from:
      -[GCK_GCDAsyncSocket closeWithError:] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLCreateContext", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLGetBufferedReadSize", referenced from:
      ___37-[GCK_GCDAsyncSocket flushSSLBuffers]_block_invoke in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket doReadData] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLHandshake", referenced from:
      -[GCK_GCDAsyncSocket ssl_continueSSLHandshake] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLRead", referenced from:
      -[GCK_GCDAsyncSocket flushSSLBuffers] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket doReadData] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetCertificate", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetConnection", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetEnabledCiphers", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetIOFuncs", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetPeerDomainName", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetProtocolVersionMax", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLSetProtocolVersionMin", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SSLWrite", referenced from:
      -[GCK_GCDAsyncSocket doWriteData] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_SecCertificateCopyData", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecCertificateCreateWithData", referenced from:
      -[GCKDeviceAuthChannel init] in GoogleCast(GCKDeviceAuthChannel.o)
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecKeyRawVerify", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecPolicyCreateBasicX509", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustCopyPublicKey", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustCreateWithCertificates", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustEvaluate", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustGetCertificateAtIndex", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustGetCertificateCount", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_SecTrustSetAnchorCertificates", referenced from:
      -[GCKDeviceAuthChannel didReceiveBinaryMessage:] in GoogleCast(GCKDeviceAuthChannel.o)
  "_kCFStreamNetworkServiceType", referenced from:
      -[GCK_GCDAsyncSocket enableBackgroundingOnSocketWithCaveat:] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamNetworkServiceTypeVoIP", referenced from:
      -[GCK_GCDAsyncSocket enableBackgroundingOnSocketWithCaveat:] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamPropertySSLPeerTrust", referenced from:
      ___33-[GCKCastSocket socketDidSecure:]_block_invoke in GoogleCast(GCKCastSocket.o)
  "_kCFStreamPropertySSLSettings", referenced from:
      -[GCK_GCDAsyncSocket cf_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsAnyRoot", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsExpiredCertificates", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsExpiredRoots", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLCertificates", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLIsServer", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLLevel", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLPeerName", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLValidatesCertificateChain", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCKCastSocket connectToHost:port:withTimeout:] in GoogleCast(GCKCastSocket.o)
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCKCastSocket connectToHost:port:withTimeout:] in GoogleCast(GCKCastSocket.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我从github下载了示例Hello文本应用程序,它正在构建中,没有错误。我做错了什么

更新:根据@hyrthytic Fistman的建议,我针对安全框架进行了链接,消除了23个链接器错误。但是,仍有13个链接器错误,如下所示:

Undefined symbols for architecture i386:
  "_kCFStreamNetworkServiceType", referenced from:
      -[GCK_GCDAsyncSocket enableBackgroundingOnSocketWithCaveat:] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamNetworkServiceTypeVoIP", referenced from:
      -[GCK_GCDAsyncSocket enableBackgroundingOnSocketWithCaveat:] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamPropertySSLPeerTrust", referenced from:
      ___33-[GCKCastSocket socketDidSecure:]_block_invoke in GoogleCast(GCKCastSocket.o)
  "_kCFStreamPropertySSLSettings", referenced from:
      -[GCK_GCDAsyncSocket cf_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsAnyRoot", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsExpiredCertificates", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLAllowsExpiredRoots", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLCertificates", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLIsServer", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLLevel", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLPeerName", referenced from:
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
  "_kCFStreamSSLValidatesCertificateChain", referenced from:
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCKCastSocket connectToHost:port:withTimeout:] in GoogleCast(GCKCastSocket.o)
      -[GCK_GCDAsyncSocket maybeStartTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCK_GCDAsyncSocket ssl_startTLS] in GoogleCast(GCKAsyncSocketWrapper.o)
      -[GCKCastSocket connectToHost:port:withTimeout:] in GoogleCast(GCKCastSocket.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

有什么想法吗?

您需要链接
安全性.framework
CFNetwork.framework


Xcode>您的项目>构建阶段>使用库链接二进制文件>+>安全性。框架

转到链接器标志并添加“-ObjC”标志

这确实消除了23个链接器错误。但是还有一些。。。请查看更新帖子。谢谢!它消除了所有的错误!你知道为什么谷歌网页上没有说明吗?因为在iOS上发布代码比需要的要难。然后,确保包含指南中指出的必要框架。如果没有,请尝试取消链接并再次链接GoogleCast框架。并确保它不支持64位体系结构。