【问题标题】:ld: symbol(s) not found for architecture arm64 TwiterKitld:未找到架构 arm64 TwiterKit 的符号
【发布时间】:2019-06-01 21:16:41
【问题描述】:

由于某种原因,twitterkit 在我的项目中。我没有添加它,但我猜它是我添加的另一个 pod 的一部分。我遇到的问题是它给了我 43 个错误。

开始:

    Undefined symbols for architecture arm64:
  "_TWTRCoreOAuthSigningOAuthEchoHeaders", referenced from:
      -[TWTROAuthSigning OAuthEchoHeadersForRequestMethod:URLString:parameters:error:] in TwitterKit(TWTROAuthSigning.o)
  "_OBJC_CLASS_$_TWTRScribeService", referenced from:
      objc-class-ref in TwitterKit(Twitter.o)
  "_TWTRTwitterAuthenticatePath", referenced from:
      -[TWTRWebAuthenticationViewController initWithAuthenticationToken:authConfig:APIServiceConfig:forceLogin:] in TwitterKit(TWTRWebAuthenticationViewController.o)

...

    ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我该如何解决这个问题?

我的豆荚:

    pod 'Firebase'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'FirebaseUI'
pod 'SDWebImage'
pod 'Mapbox-iOS-SDK', '~> 4.9'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Nuke', '~> 7.0'

在添加 Nuke 之前,没有问题。

更新:

    pod 'SDWebImage' Seems to be the pod causing the issue: after remoiving it the errors were gone

我该怎么办?

更新 2:

重新安装 SDWebImage 后,错误仍然消失。我不知道是什么导致了错误。

【问题讨论】:

  • 我检查了 Nuke 的 podspec 和源代码。 github.com/kean/Nuke 它不使用 TwitterKit。我认为,问题的根源不在于 Nuke。让我们试着弄清楚。
  • @AndreiKonstantinov 看来我找到了罪魁祸首检查更新
  • @AndreiKonstantinov 这很奇怪,因为一旦我在 podfile 中注释掉 sdwebImage 并在终端中将其删除,所有错误都消失了。对于我删除的其他 pod,情况并非如此。是的,错误是直接粘贴的

标签: ios cocoapods twitterkit


【解决方案1】:

看起来像是 Cocoapods 本身的问题,而不是特定的 pod。它发生了。

  • 关闭 Xcode
  • 在终端中执行pod install
  • 通过 Build -> Clean 菜单项清理项目
  • 再次构建项目
  • 如果问题仍然存在,请更新 cocoapods 并重复之前的过程

【讨论】:

    猜你喜欢
    • 2019-10-03
    • 2021-07-28
    • 2018-08-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-20
    • 2016-01-24
    • 2013-11-18
    相关资源
    最近更新 更多