"no such module" on Xcode 7 beta 2

I saw this question , but I still cannot import the framework and use it in Xcode 7 beta 2 (7A121l).

I am currently trying to use Result through carthage. After adding it to the Build Phases / Link Binary with binaries and the Embed Framework, I can successfully compile, but I get an error (yes, this indicates success, and then the error: S):

No such module 'Result' 

Upon import:

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

The assembly can execute and compile, but I can not, for example, cmd + click on Result.




Edit 1: In Xcode 6.3.2, it works as expected.

Edit 2: Radar open: 21588771

+14
ios swift xcode7 xcode7-beta2 carthage
Jun 29 '15 at 1:05
source share
2 answers

Neil's answer is right, but there is a very subtle difference in how you set FRAMEWORK_SEARCH_PATHS . Therefore, adding it only to Build Phases/ Link Binary with Binaries , my initial setup was 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)/** 

The above setting is incorrect and will not work. Working below :

 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/ 
+6
Jun 29 '15 at 21:18
source share
β€” -

You need to make sure that FRAMEWORK_SEARCH_PATHS in xcodeproj includes the path where Result.framework .

+1
Jun 29 '15 at 16:53
source share



All Articles