Travis-CI is unable to open file

2019-04-14 14:22发布

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.

2条回答
一纸荒年 Trace。
2楼-- · 2019-04-14 14:35

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
查看更多
贪生不怕死
3楼-- · 2019-04-14 14:45

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

enter image description here

查看更多
登录 后发表回答