I'm trying to figure how to build metal shaders for iphone os using xcrun. I have (the almost latest) Xcode 11.3.1 installed on macos 1.4 Mojave.
xcrun --sdk iphoneos --show-sdk-path
reports that the sdk cannot be found.
I checked
xcrun --sdk macosx --show-sdk-path
,
which reports
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
The iphone and TVOS sdks don't seem to be there at all. However, I'm able to use the Xcode IDE to build to an iphone. I checked the build logs and found that one step sets the SDKROOT to:
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk
which is inside the Xcode bundle.
I want to be able to build from the command line, but clearly the correct path hasn't been registered. Do I need to reinstall the command line tools, or is there some setting I need to add an SDK to xcrun?
How do I proceed?