ios - Travis-CI 无法打开文件

标签 ios objective-c swift continuous-integration travis-ci

我正在尝试构建我的 iOS 项目,但 travis-ci 正在打印以下错误消息:

/Users/travis/build/BilalReffas/Analyzer/Pods/Pods/Target Support Files/Pods-Analyzer/Pods-Analyzer.debug.xcconfig: unable to open file (in target "Analyzer" in project "Analyzer") (in target 'Analyzer')

当然,我选择了共享方案。我可以在本地构建项目。我不明白为什么 travis 找不到 debug.xcconfig 文件。

My Podfile:

  platform :ios, '10.0'

target 'Analyzer' do
  use_frameworks!

  pod 'Charts' 

end

我的 travis.yml:

language: objective-c
osx_image: xcode10
xcode_workspace: Analyzer.xcworkspace 
xcode_scheme: Analyzer
xcode_destination: platform=iOS Simulator,OS=12.0,name=iPad Pro (9.7-inch)
podfile: Podfile
before_install:
  - gem install cocoapods
  - pod install --repo-update

调试后我使用ssh检查文件权限。

-rw-r--r--  1 travis  staff    662 Nov  3 14:41 Pods-Analyzer.debug.xcconfig

如您所见,打开文件应该完全没问题。

最佳答案

这与特拉维斯无关。这是一个来自 cocoapods 的奇怪错误.将 gem install cocoapods --pr 添加到您的 travis.yml 应该可以修复它。

我当前的 travis.yml:

language: swift
osx_image: xcode10.1
xcode_workspace: Analyzer.xcworkspace 
xcode_scheme: Analyzer
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPad Pro (9.7-inch)
podfile: Podfile
before_install:
  - gem install cocoapods --pre
  - pod install --repo-update

关于ios - Travis-CI 无法打开文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53093335/

相关文章:

ios - 如何删除圆形 UIImageView 中的空白区域?

ios - Apple Pay 表 产品描述和规范

ios - 如何在 Swift 3 中使用 SwiftyJSON 搜索 JSON 元素

ios - 将 UITableView 约束到其父 View 的边缘会导致布局冲突

ios - Xcode Using Auto Layout 不会为每个 iPhone 型号优化屏幕

ios - 警告 : Application delegate received call to -application:performFetchWithCompletionHandler: but the completion handler was never called

ios - 将 16 位颜色范围内的值转换为 UIColor

ios - 以编程方式添加的 UIView 的自动布局

ios - 导致错误 : IR generation failure program too clever 的变量值

ios - 在框架内将 Swift 文件公开给 Objective-C