Does Unity require a minimal Xcode version?

Suddenly (I believe after updating to Unity 2020.2.1), my iOS project can no longer be archived from within XCode 10. I’m using this older version because newer ones aren’t compatible with my old hardware.

The error log indicates that some library was built with Xcode 11. I’m not using any additional tools or special setup, simply hitting Build in Unity. So, is Unity using any such libraries when generating the project? Where can I find information about the officially supported versions?

1 Like

The error log indicates that some library was built with Xcode 11.
can you please paste the actual error? there should be no problem with linking libs built with newer xcode. As an example, we still use xcode9 in places for tests (and it works).
We did indeed switch to building unity lib with xcode11, but it should still work

1 Like

Thank you for looking at this, here’s the error line that makes me think there’s a version issue between “producer” and “reader”:

Short Error Could not reparse object file in bitcode bundle: ‘Invalid bitcode version (Producer: ‘1100.0.33.8.0_0’ Reader: ‘1000.11.45.2_0’)’, using libLTO version ‘LLVM version 10.0.0, (clang-1000.11.45.2)’ for architecture arm64

The entire error (and only error while archiving):

All Errors Showing All Issues Ld /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal arm64 cd /Users/Chris/Exit/Builds/iOS/Exit export IPHONEOS_DEPLOYMENT_TARGET=11.0 export PATH=“/Applications/Xcode/10/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode/10/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin” /Applications/Xcode/10/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -dynamiclib -isysroot /Applications/Xcode/10/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -L/Users/Chris/Exit/Builds/iOS/Exit/Libraries -F/Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -filelist /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework.LinkFileList -install_name @rpath/UnityFramework.framework/UnityFramework -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -map -Xlinker /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/UnityFramework-LinkMap-normal-arm64.txt -miphoneos-version-min=11.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -liPhone-lib -framework Metal -framework Security -framework MediaToolbox -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework AVKit -framework CFNetwork -framework CoreGraphics -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework OpenAL -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lil2cpp /Users/Chris/Exit/Builds/iOS/Exit/Libraries/baselib.a -weak_framework GameController -Xlinker -dependency_info -Xlinker /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_dependency_info.dat -o /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework ld: warning: instance method ‘viewDidAppear:’ in category from /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityViewControllerBase+iOS.o overrides method from class in /Users/Chris/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvgvffyckrtikuhgmlxyjiyjfxcx/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityViewControllerBase.o ld: could not reparse object file in bitcode bundle: ‘Invalid bitcode version (Producer: ‘1100.0.33.8.0_0’ Reader: ‘1000.11.45.2_0’)’, using libLTO version ‘LLVM version 10.0.0, (clang-1000.11.45.2)’ for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I’m building with Unity 2020.2.1f1 and then archiving with Xcode 10.0.

Also stuck on this Xcode version because it’s the newest one my MacOS supports (High Sierra 10.13.16) which in turn is the highest one I can install on my hardware (MacBook Air 13-inch Late 2010).

thats about bitcode specifically. I am not sure if bitcode is mandatory, but can you disable it completely in xcode project and check if that works?

I disabled “Enable Bitcode” in XCode BuildSettings, built again, and tried to archive, but it logged the same error as above.

Unity-iPhone and UnityFramework targets takes ENABLE_BITCODE value from Unity-iPhone Project settings, did you disabled ENABLE_BITCODE on project level ?

1 Like

Ok thanks, that helps! I must have accidentally disabled the flag on the sub-targets, but not for the whole project. Now I was able to archive with bitcode disabled. At least that’s a workaround! :slight_smile:

Hi,
I got the same error:
The first screenshot is error,the second is settings for bitcode:
I try to enable/disable bitcode,but they have the same result.
I have no idea,and my unity version is 2020.3.1f1c1 personal,the xcode version is 10.0,the version of my system is macos 10.13.5,so i can`t use higher version xcode.
I hope anyone can do me a favor.
thanks!