kas-kad
kas-kad

Reputation: 3764

Error: "no such module <Swift Cocoapod name>" with Jenkins

I'm trying to setup Jenkins slave, to build my Swift project that uses a Swift pod called "Freddy".

The problem is the build failed with error:

error: no such module 'Freddy'

This is my Podfile:

platform :ios, '8.0'
use_frameworks!

target 'MyProject' do

pod 'AFNetworking', '~> 3.0'
pod 'Freddy'

end

CocoaPods version 0.39.0

Xcode 7.2.1 (no problems while building from Xcode directly)

PS. Same problem had happened with Alamofire pod before I replaced it with AFNetworking.

PSS. Jenkins executes following xcodebuild:

xcodebuild -scheme MyProject -workspace MyProject.xcworkspace -configuration Debug clean build CONFIGURATION_BUILD_DIR=jenkinsOutput "CODE_SIGN_IDENTITY=iPhone Developer: Andrei Kadochnikov (XXXXXXXX)" -destination "platform=iOS Simulator,name=iPhone 6,OS=latest"

PSSS. I've tried to execute this command from terminal by myself, got same error as Jenkins shows me.

Upvotes: 3

Views: 1341

Answers (2)

Bill Xie
Bill Xie

Reputation: 105

I have encountered this error recently,"no such module" and I finally found it course by the xcodebuild is a project not workspace.

Check the advanced settings on xcode plugin set the workspace path.

That solved the problem.

Upvotes: 1

kas-kad
kas-kad

Reputation: 3764

Figured that the build was failed because of parameter CONFIGURATION_BUILD_DIR=jenkinsOutput. I've got rid of it and build succeeded. Confusing error message.

Upvotes: 1

Related Questions