“没有这样的模块”在Xcode 7 beta 2上 [英] "no such module" on Xcode 7 beta 2
问题描述
我看到了这个问题,但我仍然无法导入框架并在Xcode 7 beta 2(7A121l)中使用它。
I saw this question, but I am still unable to import a framework and use it inside Xcode 7 beta 2 (7A121l).
所以目前我正试图通过carthage使用结果。将它添加到构建阶段/链接二进制文件与二进制文件和嵌入框架后,我能够成功编译,但我收到一个错误说明(是的,它表示成功,然后错误: S):
So currently I am trying to use Result, via carthage. After adding it to Build Phases/ Link Binary with Binaries and Embed Frameworks I am able to compile successfully, but I get an error stating (yes it says success and then error :S):
No such module 'Result'
在导入时:
import Result
func serverRequest() -> Result<String, NSError> {
...
}
构建能够运行和编译,但我无法cmd +点击结果,例如。
The build is able to Run and Compile, but I am not able to cmd+click on Result, for example.
编辑1:
在Xcode 6.3.2上它按预期工作。
Edit 1: On Xcode 6.3.2 it works as expected.
编辑2:
打开雷达:21588771
Edit 2: Opened a radar: 21588771
推荐答案
Neil的回答是正确的,但是如何设置 FRAMEWORK_SEARCH_PATHS $有一个非常微妙的区别C $ C>。所以在将它添加到
Build Phases / Link Binary with Binaries
后,我的初始设置是这样的:
Neil's answer is right, but there a very subtle difference how you set the FRAMEWORK_SEARCH_PATHS
. So after adding it only to Build Phases/ Link Binary with Binaries
, my initial setup was like this:
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/
这篇关于“没有这样的模块”在Xcode 7 beta 2上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!