"no such module" Xcode 7 测试版 2

"no such module" on Xcode 7 beta 2

我看到了这个 ,但我仍然无法导入框架并在 Xcode 7 beta 2 (7A121l) 中使用它。

所以目前我正在尝试通过迦太基使用 Result。将其添加到 Build Phases/ Link Binary with BinariesEmbed Frameworks 后,我能够成功编译,但出现错误陈述(是的,它说成功然后错误:S):

No such module 'Result'

关于导入:

import Result

func serverRequest() -> Result<String, NSError> {
    ...
}

该构建能够 运行 和编译,但我不能 cmd+click 结果,例如。


编辑 1: 在 Xcode 6.3.2 上它按预期工作。

编辑 2: 开了个雷达:21588771

您需要确保 xcodeproj 中的 FRAMEWORK_SEARCH_PATHS 包含 Result.framework 所在的路径。

Neil 的回答是正确的,但是 FRAMEWORK_SEARCH_PATHS 的设置方式存在细微差别。所以在仅将它添加到 Build Phases/ Link Binary with Binaries 之后,我的初始设置是这样的:

drwxr-xr-x   8 ruiperes  staff    272 29 Jun 08:35 Playground
drwxr-xr-x   5 ruiperes  staff    170 29 Jun 22:08 Playground.xcodeproj
drwxr-xr-x   4 ruiperes  staff    136 29 Jun 00:12 PlaygroundTests
drwxr-xr-x   4 ruiperes  staff    136 29 Jun 00:12 PlaygroundUITests
drwxr-xr-x   8 ruiperes  staff    272 29 Jun 08:42 Result.framework


FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/**

以上是错误的设置,无法使用。 下面的工作:

drwxr-xr-x   4 ruiperes  staff    136 29 Jun 22:07 Frameworks
drwxr-xr-x   8 ruiperes  staff    272 29 Jun 08:35 Playground
drwxr-xr-x   5 ruiperes  staff    170 29 Jun 22:08 Playground.xcodeproj
drwxr-xr-x   4 ruiperes  staff    136 29 Jun 00:12 PlaygroundTests
drwxr-xr-x   4 ruiperes  staff    136 29 Jun 00:12 PlaygroundUITests


FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/Frameworks/