I’m attempting to build my project after upgrading to XCode 16 and am having trouble getting it to compile. When I attempt to build the project I get an error: air-lld:1:1 symbol(s) not found for target 'air64_v24-apple-ios15.0.0-simulator'
.
I am able to get my project to compile by setting the metal language revision property to 3.2, but this causes other issues for older devices. Ideally I should be able to build using the default for the deployment target
option.
I’m using CoreImage metal kernels with both [[stitchable]] kernels and extern c kernels as a fallback for devices that don’t support metal 2.4. The code used to compile the extern c kernels is taken straight from the wwdc video from 2020, and the stitchable kernels merely need the -framework CoreImage
flag set.
Any advice for how I can get the project to compile would be greatly appreciated!
2
Answers
As far as I can tell apple has broken CoreImage in xcode 16. I seem to have found a solution by linking against the older version of coreimage.metallib and including it in the app bundle. It's about 45kb, so not the end of the world, but it'd be nice if it wasn't needed.
So find the coreimage folder inside of xcode 15 frameworks folder (
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage)
and then place it inside the root of your project. I created a folder calledFrameworks
and placed it in there. The only file you need to keep in there is the coreimage.metallib file, you can delete everything else. The file structure should look likeYourProject/Frameworks/CoreImage/coreimage.metallib
Then in the build settings under "Other metal linker flags" add the following two lines, where the 2nd line is the path to the folder containing your copied CoreImage folder.
-F
./Frameworks
Tested on Xcode 16.2 RC, still has the same error. One workaround is to set the
Metal Language Revision
to3.2
.However, this version was introduced with iOS 18, and it’s strange that it still works on iOS 17 devices. I don’t know if it has any side effects.
Or copy the Xcode 15 framework. However, as the framework is from iOS 17, by doing the steps from @aferriss, you’ll lose new iOS 18 Core Image API. I also collect the Xcode 15 files here, so you don’t need to download it again.