Quick: No such module 'Quick'

Created on 17 Nov 2014  路  20Comments  路  Source: Quick/Quick

I can't seem to get the Quick and Nimble projects to build as dependencies and show up in my project. I keep getting "No such module" when I try to import either module Quick or Nimble into my Swift test file. When I add these projects to my workspace, Quick.framework is marked red and missing even when I build the application for testing. When I change my scheme to the Quick-iOS scheme, the Quick.framework turns black and is "present" but disappears again when I change to my app scheme.

Are the installation instructions up to date for XCode 6? I even created a clean test bundle to make sure I wasn't saving any old configuration settings. I'm not sure what else to do to troubleshoot this issue.

bug

Most helpful comment

@sharplet I didn't do anything in my pod file. I just added config targets to the newly included nimble and quick .xcodeproj. I've never tried it your way, that may be a better solution.

screen shot 2014-11-18 at 10 19 57 am

All 20 comments

@sabymike I can definitively confirm the installation instructions work on Xcode 6.1 and 6.1.1 GM. Could you double-check you've got everything set up correctly? Are you adding Quick and Nimble to your test target correctly? :speak_no_evil:

If you're sure you're following the instructions correctly, could you upload a sample project demonstrating the problem to GitHub (like another contributor did in #180)? I'd be happy to diagnose the issue, but I'd need to know what I'm doing differently from your project. :bulb: :tophat:

I'm fairly positive that I'm adding them correctly. My linking step ends up looking like this:

screen shot 2014-11-17 at 9 14 19 pm

My project was created over a year ago and has been upgraded several times as Xcode has changed. I'm using cocoa pods to set up the workspace where my project is housed. I wouldn't be surprised if there so conflict in the configuration with Cocoapods + Quick.

I wouldn't be surprised if there so conflict in the configuration with Cocoapods + Quick.

Hmm, that's possible... Unless I see the actual project there's no real way to say for sure. Could you upload a small sample project somewhere? Maybe one with the same Podfile and Git submodules, but none of the source code?

Unfortunately, a new project from scratch with the same podfile works for me. Its likely that a legacy of build setting tweaks is keeping it from working. If I ever do get it figured out I will update with the solution.

Please do! I can reason about potential issues as best I can if you'd like to provide any additional info. Update this issue with whatever you find. :pray:

Ok so I think I've found the solution. The libraries were not being built because I have custom build configuration names. I've changed them from Debug and Release to a larger suite of Dev, Beta, Test, and Release.

I needed to add a configuration named Test to both the Nimble and Quick projects for it to work. Once they shared a config name, the libraries build. Now I can run tests like a civilized person!

@sabymike I'm interested to see precisely how you achieved that鈥擨've had the same problem before and resolved it with a line like this in the Podfile:

xcodeproj "Foobar", "MyConfig" => :debug, "Beta" => :release

(I'm pretty sure that's the correct syntax...)

@sabymike Interesting! I'm glad you figured it out. If anyone else has a similar problem I'll try pointing them to this issue!

@sharplet I didn't do anything in my pod file. I just added config targets to the newly included nimble and quick .xcodeproj. I've never tried it your way, that may be a better solution.

screen shot 2014-11-18 at 10 19 57 am

Silly me, of course CocoaPods isn't relevant here yet! Good job 馃憤

@sabymike Had the same issue as you and adding the correct build configuration name worked for me too. When modifying the configurations in the Nimble and Quick projects, how did you persist the change? I am currently using git submodules to test out this framework. If another developer wants to use my branch, the submodules will be downloaded without these changes.

@fergalrooney I not sure how you would make this persist using submodules for other developers. I have since stopped using Quick in my project so I haven't kept up with maintaining these settings.

@sabymike Thanks for the reply. It sounds like Cocoapods is the way to go for having custom build configuration names as it automatically configures these for you when the Pods project is generated. Will wait for its next release as its currently in beta.

@fergalrooney Were you able to try this with CocoaPods? I am using custom build configurations and tried with 0.36.3 and I still get the same error.

@priteshshah1983 Yes I was able to integrate successfully using cocoapods v0.36. I am using Quick v0.3.1 and Nimble v0.4.2. I needed to specify use_frameworks! in my Podfile and everything worked seamlessly. Are you getting any warnings / errors outputted from pod install?

Thanks @fergalrooney! I just found out that my custom build configuration was overwriting the FRAMEWORK_SEARCH_PATHS set by CocoaPods. I fixed that and everything is great now.

For me, it is because I haven't told Carthage to build. This makes it

carthage build --platform iOS,Mac

I had the same issue. Resolved it with adjusting test target build settings to not always include swift modules

The clue was the following warning from cocoapods after running pod install:

[!] The `StashTests [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-StashTests/Pods-StashTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `StashTests [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-StashTests/Pods-StashTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

Fix is to set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO

hm, actually, the issue is still there :) the funny thing is that it compiles and runs tests just fine. it simply complains about import Quick
screenshot 2016-12-03 16 45 04

@alexvbush, that Xcode quirk occurs every once in awhile for me. For whatever reason, cleans / recompiles sometimes resolves it 馃槄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rlam3 picture rlam3  路  11Comments

unchartedworks picture unchartedworks  路  17Comments

RShergold picture RShergold  路  13Comments

ironforward picture ironforward  路  24Comments

thislooksfun picture thislooksfun  路  26Comments