I'm making a library that uses the variants variable of AVAsset. That's less important; the significant part is that it has an Xcode 13+ requirement. This library may be used by apps running Xcode 12. Is there a compiler flag that can run code only if on a certain version of Xcode?
Something like how you would do this for a Swift version:
#if swift(>=5.0)
// code
#else
// code
#endif
I'd want to do
#if xcode(>=13.0)
// use variants
#endif
I found that #if compiler(>=5.5) works here. Note, this is different than if swift(>=5.5), which will not necessarily work depending on the swift version you have set in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With