简体   繁体   English

詹金斯 | 可可豆 | 斯威夫特| 错误:没有这样的模块“RealmSwift”

[英]Jenkins | Cocoapods | Swift | error: no such module 'RealmSwift'

error: no such module 'RealmSwift'错误:没有这样的模块“RealmSwift”

import RealmSwift导入 RealmSwift

While building a project from Xcode, it's working fine.从 Xcode 构建项目时,它运行良好。 Building it from Jenkins,gives me the above mentioned error.从 Jenkins 构建它,给了我上面提到的错误。

** BUILD FAILED ** ** 构建失败 **

The following build commands failed:以下构建命令失败:

CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler

(2 failures) Build step 'Xcode' marked build as failure Finished: FAILURE (2 次失败)构建步骤“Xcode”将构建标记为失败完成:失败

My Pod file looks like below我的 Pod 文件如下所示

target 'MyProject' do
use_frameworks!
# Pods for MyProject
pod 'Google/Analytics'
pod 'GoogleTagManager','~> 3.15.0'
pod 'RealmSwift','~> 2.1'

target 'MyProjectTests' do
# Pods for testing
end

target 'MyProjectUITests' do
# Pods for testing
end   
end

You may not have versioned your Pods directory.您可能没有对Pods目录进行版本控制。

You can either remove Pods from your .gitignore, or add a pod install command inside each jenkins script.您可以删除Pods从你的.gitignore,或添加一个pod install每个詹金斯脚本中的命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM