"linker command failed with exit code 1" 当我通过 pods 添加新的 TwitterKit 时?

"linker command failed with exit code 1" when i add new TwitterKit by pods?

昨天更新后 pods,有这 74 个错误。

Undefined symbols for architecture arm64:   "_OBJC_CLASS_$_TWTRDateUtil", referenced from:
      objc-class-ref in TwitterKit(TWTRTweetView.o)
      objc-class-ref in TwitterKit(TWTRDateFormatter.o)   "_OBJC_CLASS_$_TWTRScribeService", referenced from:
      objc-class-ref in TwitterKit(Twitter.o)   "_OBJC_CLASS_$_TWTRGuestSessionManager", referenced from:
      objc-class-ref in TwitterKit(Twitter.o)   "_TWTRCoreVersion", referenced from:
      +[Twitter assertValidTwitterCoreVersion] in TwitterKit(Twitter.o)   "_TWTRUserSessionVerifierIntervalDaily", referenced from:
      -[Twitter kitDidFinishStarting] in TwitterKit(Twitter.o)   "_TWTRNetworkingUserAgentHeaderKey", referenced from:
      -[Twitter startWithConsumerKey:consumerSecret:] in TwitterKit(Twitter.o)   "_TWTRAuthAppOAuthDeniedKey", referenced from:
      -[TWTRWebAuthenticationProvider requestAccessTokenWithAuthResponse:completion:] in TwitterKit(TWTRWebAuthenticationProvider.o)

链接器命令失败,退出代码为 1。

我的新 pods:

pod 'Fabric'
pod 'TwitterKit'
pod 'Crashlytics'

之前:

pod 'Fabric/Core', '~> 1.2.3'
pod 'Fabric/Crashlytics', '~> 1.2.3'
pod 'Fabric/Twitter', '~> 1.2.3'

这个答案对我没有帮助:, add libstdc++

我也尝试添加 Twitter.Framework, Social.framework, Accounts.framework.

我使用两个带链接器标志的大库 -ObjC

我今天刚经历过这个。我还必须为 TwitterCore 安装 pod。再次将以下行添加到 Podfile 和 运行 pod install

pod 'TwitterCore'

如果这不起作用,那么也尝试转到 Build Settings 并在搜索栏中搜索“other linker flags”。一旦找到它,只需双击右侧列出实际标志的区域。

使用 - 图标删除所有标志,然后使用 + 图标添加以下标志:$(inherited)