purrrminator purrrminator - 1 year ago 270
Swift Question

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'

target 'MyProject' do

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


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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download