I have a few projects I'm trying to build with Xcode 6 Beta 2. The projects all have some type of library that uses XCTest (Kiwi/XCTest and Specta) that don't build in Xcode 6 because XCTest/XCTest.h cannot be found.

fatal error: 'XCTest/XCTest.h' file not found
#import <XCTest/XCTest.h>

I noticed that XCTest.framework is no longer in the "Link Libraries with Binaries" build phase list, but that's fine because when I create a new project with Xcode 6 it appears the library is linked in automatically.

Perhaps of some relevency, my XCTest-needing dependencies are all brought in via Cocoapods.

Is there anything I'm unaware of that I need to update with my project?

推荐答案

Note: This may not be needed for any projects created in Xcode 7.

CocoaPods had a fix for this here and here


In order to fix this for any CocoaPod dependencies you need to add the following to FRAMEWORK_SEARCH_PATHS in any Pod target that requires XCTest (e.g. Kiwi, Specta, FBSnapshotTestCase, etc).

$(PLATFORM_DIR)/Developer/Library/Frameworks

screenshot

This will allow you to reference XCTest in any dependencies you may have. This may be fixed in a future update of CocoaPods, or the Pod you are referencing, so you may want to remove it later.

It is not detrimental to earlier versions of Xcode so should be safe to use.

Ios相关问答推荐

如何调整包含extView的UICollectionViewListCell的大小?

更新Flutter项目时出错:CocoaPods找不到pod webview_flutter_wkwebview的兼容版本""

在SwiftUI中动态隐藏列表的空部分

当重新呈现UI时,嵌套的 struct 值如何与@Observable一起工作?

XcodeCloud生成失败,返回";ci_pre_xcodeBuild.sh是可执行文件,但退出时返回2个退出代码.";

仅更改 AttributedString 的字符串(例如 UIButton 配置 attributeTitle)

如何在SwiftUI中实现淡入淡出加粘标题屏幕效果

Swift Combine和iOS版本限制?

CGPath intersection(_:using:) 和朋友(iOS 16 中的新功能)坏了?

如何在 SwiftUI 中对表格行使用 Transferable

NSOperation 有延迟 - 它是异步的还是同步的?

如何在 SwiftUI 的 TabView 中添加底部曲线?

SwiftUI 选项卡式视图防止滑动到下一个选项卡

SensorKit - 获取数据不调用结果委托函数

禁用 UITextField 的自动更正

iPhone 6 和 6 Plus 媒体查询

Xcode 4.1 致命错误:自构建预编译头文件后修改了 stdlib

在 Grand Central Dispatch 中使用 dispatch_sync

如何为 NSDate 添加一个月?

UIGestureRecognizer 阻止子视图处理touch 事件