以下pod已集成到没有相同Swift版本的目标中

joe*_*oey 17 xcode ios cocoapods swift3

我正在将我的项目更新为Swift 3.当我将一些cocoapods更新为swift 3时,我在运行pod install后在终端中收到以下消息:

 Analyzing dependencies
[!] The following pods are integrated into targets that do not have the same Swift version:

- AWSCore required by myApp (Swift 3.0.1), myApptests (Swift 3.0)
- AWSS3 required by myApp (Swift 3.0.1), myApptests (Swift 3.0)
- Alamofire required by myApp (Swift 3.0.1), myApptests (Swift 3.0)
Run Code Online (Sandbox Code Playgroud)

这里有一个很长的线程:https://github.com/CocoaPods/CocoaPods/issues/5864关于这个问题,我尝试了建议的解决方案,但是当我运行pod安装时,我仍然得到相同的消息.

这是我的pod文件:

在此输入图像描述

在给定链接之外,我在这个问题上找不到多少.其他人遇到过同样的问题?有解决方案吗 我上周末刚刚安装了Xcode 8.1和Swift 3.0.1.

Dar*_*usV 37

我知道这篇文章已经过时但我刚刚解决了一个最近的问题,当我用swcode4将swift3项目更新为Xcode9时,问题说: [!] The following pods are integrated into targets that do not have the same Swift version:

Appsee required by MyApp (Swift 4.0), MyAppUnitTest (Swift 3.0) ... Allpods

我的解决方案是:我的主要目标MyApp是4.0版的swift版本,我还将我的UnitTest版本更新为4.0 Build Settings- >Swift Language Version


vla*_*dan 5

我已经解决了这个问题:

  1. 我有两个目标:主项目和测试目标.
  2. 我的主要项目的目标是"使用遗留Swift语言版本"(在构建设置中)为"未指定(3.0)".
  3. 我将'使用旧版Swift语言版'设置为'否',它运行正常.

  • 这个选项在哪里?我在构建设置中没有看到它(xcode 8.3.3) (2认同)

Ale*_*nin 5

Xcode 9由于它同时支持3.2和4.0 swift版本,因此此问题变得更糟,但是Cocoa Pods尚不支持此版本:

[!] The following pods are integrated into targets that do not have the same Swift version:
- XCGLogger required by target1 (Swift 4.0), target2 (Swift 3.0)
Run Code Online (Sandbox Code Playgroud)

解决方法:暂时将target1切换到swift 3.2,安装可可豆荚,然后再切换回swift 4.0。