- Home /
iOS Archive error: Build input file cannot be found: '/Users/navil/Desktop/WW3ClientiOS/Classes/Native/Unity.ugui_CodeGen.c' (in target 'Unity-iPhone' from project 'Unity-iPhone')
Hi guys,
I have a question!
I recently upgraded Unity to the latest version (2019.2.10f1) because I'd like to use IAP (in app purchases). My windows and android builds seem to be ok, but my iOS build fails in xCode with the below error (while trying to do the archive):
ARCHIVE FAILED **
The following build commands failed: CompileC /Users/navil/Library/Developer/Xcode/DerivedData/Unity-iPhone-hitwrvrwzwmjnhaucycumjzhcenh/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Unity.ugui_CodeGen.o /Users/navil/Desktop/WW3ClientiOS/Classes/Native/Unity.ugui_CodeGen.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) /Users/navil/Library/Developer/Xcode/DerivedData/Unity-iPhone-hitwrvrwzwmjnhaucycumjzhcenh/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/PrecompiledHeaders/SharedPrecompiledHeaders/17326902885880269110/Prefix.pch -MMD -MT dependencies -MF /Users/navil/Library/Developer/Xcode/DerivedData/Unity-iPhone-hitwrvrwzwmjnhaucycumjzhcenh/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Unity.ugui_CodeGen.d --serialize-diagnostics /Users/navil/Library/Developer/Xcode/DerivedData/Unity-iPhone-hitwrvrwzwmjnhaucycumjzhcenh/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Unity.ugui_CodeGen.dia -c /Users/navil/Desktop/WW3ClientiOS/Classes/Native/Unity.ugui_CodeGen.c -o /Users/navil/Library/Developer/Xcode/DerivedData/Unity-iPhone-hitwrvrwzwmjnhaucycumjzhcenh/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Unity.ugui_CodeGen.o error: Build input file cannot be found: '/Users/navil/Desktop/WW3ClientiOS/Classes/Native/Unity.ugui_CodeGen.c' (in target 'Unity-iPhone' from project 'Unity-iPhone')
Do you guys know what Unity.ugui_CodeGen.c is? What can i do fix this error? Am i missing something?
Many thanks! Navil
Answer by naviln · Oct 29, 2019 at 03:55 PM
Posting my own answer here, in case it helps anyone.
First, i had a new permission that i had to grant in my pre build script (in addition to the 2 lines already had previously):
chmod +x /Users/navil/Desktop/WW3ClientiOS/MapFileParser.sh
chmod +x /Users/navil/Desktop/WW3ClientiOS/process_symbols.sh
new one: chmod +x /Users/navil/Desktop/WW3ClientiOS/usymtool
And finally, the main issue - xcode cached content. In /Users/navil/Library/Developer/Xcode/, there was a bunch of cached content related to older builds, and when trying to run the xcode build from the command line, it was using this old junk!
I manually navigated to this folder, deleted all the files, reran the build from my server, and it all worked ok. whew.
What a painful way to discover this. In any case, I learnt my lesson. Delete ALL cached content from xcode after any Unity upgrade!
Answer by yanhui · Jul 31, 2020 at 08:45 AM
Good job, bro. I met a same problem. When I Archive my project,it said that can't find some plugin file which i have already deleted and unused.
So, I