【问题标题】:TwitterKit doesn't support iOS 8.x and lowerTwitterKit 不支持 iOS 8.x 及更低版本
【发布时间】:2020-06-06 08:50:48
【问题描述】:

我正在为 Twitter 使用以下可可豆荚。

target 'test' do
  platform :ios, '12.0'
  use_frameworks!

  # Pods for test

  pod 'GoogleSignIn'
  pod 'TwitterKit'

  post_install do |installer|
    installer.aggregate_targets.each do |aggregate_target|
      aggregate_target.xcconfigs.each do |config_name, config_file|
        config_file.other_linker_flags[:frameworks].delete("TwitterCore")

        xcconfig_path = aggregate_target.xcconfig_path(config_name)
        config_file.save_as(xcconfig_path)
      end
    end
  end
end

当我的部署目标是 12.0 时,每次都会出现以下错误

"TwitterKit doesn't support iOS 8.x and lower. Please, change your minimum deployment target to iOS 9.0"
`#error "TwitterKit doesn't support iOS 8.x and lower. Please, change your minimum deployment target to iOS 9.0"

最烦人的部分是当我尝试在控制台中使用 po 并获取 error: use of unresolved identifier 'count' 以及 twitter 错误。

【问题讨论】:

  • 不要发布文字图片,而是发布文字。
  • @JoakimDanielson 更新了文字。

标签: swift xcode twitter cocoapods twitterkit


【解决方案1】:

您需要将iOS Deployment TargetTwitterKit 目标也设置为iOS 12.0 才能解决此问题。这是一个常见的错误。

将这些行也添加到您的 Cocoapod 文件中。

platform :ios, '12.0'
use_frameworks!

【讨论】:

  • 我已经更新了图片,部署目标设置为 twitter kit 和 core 都是 12.0
  • 你能贴一张 cocoapod 文件的图片吗?
  • 添加我提到的平台版本。
  • 已更新,但仍然出现相同的错误。甚至 pod install/update 也将 twitter 的部署目标更改为 9.0
  • 添加了这些行并再次安装了 cocoapod?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多