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

ぃ、小莉子 提交于 2019-12-10 17:55:48

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/35868257/error-no-such-module-swift-cocoapod-name-with-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!