Travis-CI is unable to open file

丶灬走出姿态 提交于 2019-12-06 11:30:02

问题


I'm trying to build my iOS project, but travis-ci is printing following error message:

/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')

Of course I selected my scheme as shared. It's possible for me to build the project locally. I don't understand why travis is not finding the debug.xcconfig file.

My Podfile:

  platform :ios, '10.0'

target 'Analyzer' do
  use_frameworks!

  pod 'Charts' 

end

My 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

After debugging I used ssh to check the file permission.

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

As you see this should be totally fine to top open the file.


回答1:


It has nothing to do with Travis. It's a weird bug from cocoapods. Adding gem install cocoapods --pr to your travis.yml should fix it.

My current 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



回答2:


You need to open project settings and update path to debug or release xcconfig:



来源:https://stackoverflow.com/questions/53093335/travis-ci-is-unable-to-open-file

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