-1

I am trying to integrate CI & CD for my iOS project. I have setup Jenkins but when I am trying to get Archive I am getting below error

warning: non-portable path to file /Users/gavishal/.jenkins/workspace/DemoApp/bank42/bank42/PrecompiledHeader.pch"'; specified path differs in case from file name on disk [-Wnonportable-include-path]

include "/Users/gavishal/.jenkins/workspace/DemoApp/bank42/Bank42/PrecompiledHeader.pch"

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"/Users/gavishal/.jenkins/workspace/DemoApp/bank42/bank42/PrecompiledHeader.pch"

** ARCHIVE FAILED **

The following build commands failed: CompileC /Users/gavishal/Library/Developer/Xcode/DerivedData/bank42-aptdjjajsubwnddzbvkqkcjtmawh/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/bank42.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/AppDelegate.o /Users/gavishal/.jenkins/workspace/DemoApp/bank42/bank42/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

I can't understand what am I doing wrong here.

Please guide me what am I doing wrong here. Any suggestion would be better.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Gagan_iOS
  • 3,638
  • 3
  • 32
  • 51
  • theres no clue in the information you have posted. Isn't there any other output? same xcode and swift version? – Scriptable Oct 17 '18 at 12:52
  • yes.. same version Xcode 9.4.1. I have also installed Xcode 10 in my machine. Does it make any issue? – Gagan_iOS Oct 17 '18 at 12:53
  • it can do yeah because it will install a newer version of the command line tools too. although xcode-select should still be pointing to your old one. which version have you been editing the project with? this issue could be caused by any number of possible issues – Scriptable Oct 17 '18 at 12:55
  • i am using Xcode 9.4.1 for editing the app but still same issue. I have edited my question – Gagan_iOS Oct 17 '18 at 13:02
  • Can u switch to the same Xcode version which the dev's are using to build this app?How to know which Xcode is being referred from command line: `xcode-select -p` How to switch question's answer goes here: https://stackoverflow.com/a/50926354/1289629 – Vighnesh Pai Oct 17 '18 at 13:13
  • Btw, just a question here: Which version of the Xcode work fine when you open Xcode and try Archiving the app? is it 9.4.1 or 10? – Vighnesh Pai Oct 17 '18 at 13:14
  • @VighneshPai i did change to Xcode 9.4.1 & xcode-select -p also display Xcode 9.4.1. I am using Xcode 9.4.1 for archiving the app. – Gagan_iOS Oct 17 '18 at 13:20
  • So, this app while archiving from Xcode v9.4.1 is archiving successfully but not from the command line is it? – Vighnesh Pai Oct 17 '18 at 13:20
  • yes app is Archived from app only. – Gagan_iOS Oct 17 '18 at 13:26
  • The file you have stored on disk (`PrecompiledHeader.pch`) is named different (upper or lowercase) in your project settings/or project.. – Brandon Oct 18 '18 at 03:03

1 Answers1

0

Run the following commands on the machine where you are trying to build from the commands line and everything should fall in place.

rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode

Be kind enough to use sudo if you have to :)

The problem you are having is because of the derived data.

Vighnesh Pai
  • 1,795
  • 1
  • 14
  • 38
  • can you manually goto: ~/Library/Developer/Xcode/DerivedData/ folder and delete everything you see inside those folders? and try again? Also, please copy paste the entire log in a gist and give me a link if you still face the same problem. – Vighnesh Pai Oct 17 '18 at 13:34