0

I've tried both cocoapods and git submodules but everytime I install the framework it wont build. Has anyone been able to install it. Both quick and nimble I use the code on the master branch. I also am using Swift 1.2 with xcode 6.3. It seems the framework is not getting compiled into the project. I realize sometimes when you link a framework to the workspace it goes red in the build phase area but would still work. But my quick and nimble framework references turn red randomly. I've set them in my test target only and tried to create a quick test in Objective-C and also tried swift but it just says build failed and then the framework link goes red. Has anyone been able to install it?

the formal install instructions should be here

UPDATE: I'M ABLE to install quick and nimble (on master branch) using cocoaPods but not git subModules. The project I'm using I've been instructed not to use Pods so I need to use git subModules. the IDE reports the following error and fails any test:

 IDEBundleInjection.c: Error 3587 loading bundle '/Users/someUserID/Library/Developer/Xcode/DerivedData/myproduct-aadhzxcsaigkzsgjyneytqrocsjc/Build/Products/Debug-iphonesimulator/myproductTests.xctest': The bundle “myproductTests” couldn’t be loaded because it is damaged or missing necessary resources.
DevToolsBundleInjection environment:
XCInjectDiagnostics: (null)
Cœur
  • 37,241
  • 25
  • 195
  • 267
j2emanue
  • 60,549
  • 65
  • 286
  • 456

3 Answers3

1

edit Podfile

use_frameworks!
target 'YourAppNameTests' do
   pod 'Quick'
   pod 'Nimble'
end

run

pod install
GaoYu
  • 11
  • 1
1

Follow the steps to reliable setup of Quick and Nimble:

Prerequisites:

cocoapods installed in your machine (installation Guide)

1) create a new Xcode project

Xcode—> File —> New —> Project

2) Select Single View App (Normally most of the application use this) —>Next

  • Enter Product Name (App NAme) - (here we are using WeatherForecast)

  • enable check mark for Include Unit Tests

3 )Installation

Open terminal

Move to your working directory cd (path of your project folder)

Ex: enter in terminal cd /Users/Documents/ WeatherForecast

4) Initialise pods with

 Pod init 

5) Open the newly created Podfile within your favourite text editor.

edit podfile with below contents

platform :ios, '9.0'

target WeatherForecast’ do

use_frameworks!

target 'WeatherForecastTests' do

inherit! :search_paths

pod 'Quick'

pod 'Nimble'

end

5) Save the podfile.Return to terminal and

enter pod install in terminal

6) This will install your new frameworks and create a pods project. It will also generate a workspace. You should now use the new workspace when working on your project. So if you’ve opened your project already close it and in open the WeatherForecasr.xcworkspace instead.

7) Setting up your test class

Within your tests target create a new group and file by:

Highlighting WeatherForecast Tests.

File —>New—> Group

Rename the new Group ModelTests

Highlight your new group

File —>New —> File

Select Swift file, Press Next

  • Name the new file CurrentSpecs . Press create

7) Within your new file replace the contents with the following

import Foundation

import Quick

import Nimble

@testable import WeatherForecast

class CurrentWeatherSpecs: QuickSpec {

}

After this you might face an error

“No such Module Quick”

“No such Module Nimble”

Below steps worked to Fix the error

Try the Following:

  1. open Xcode schemes list

  2. tick Nimble and Quick with “show” and close.

  3. Select Nimble as a scheme and build (cmd + B)

  4. Select Quick as a scheme and build(cmd+B)

  5. Change scheme back to your app scheme and see if the error is gone and autocompletion works

This is what I have to do from time to time

Pratima
  • 41
  • 3
0

Turns out if i add a single swift file to the test then all of a sudden the IDE can link the frameworks quick and nimble together. Very frustrating this was not in the README file.

solution: create a single swift file and add to your test target:

// Swift_Spec_doNotRemove.swift

import Quick

check here for further info.

j2emanue
  • 60,549
  • 65
  • 286
  • 456