HI all,
Does anyone know if there is a way to bypass Swift's "availability" in version 2?
We have a code that uses injection to add implementation for API that is unavailable in older versions of iOS, but is available in newer versions of iOS, which makes it easy to support older versions of iOS in a new API syntax.
With the introduction of the "availability" compiler errors we can't compile our Swift 2 code, the compiler doesn't know that these methods are injected at runtime and throws an error, and we can't call these methods from new API only because we need to support older versions.
Writing a wrapper is also not an option, reverting the code back to Obj C will be far less work, but this is an option we really don't want to resort to.
Does anyone have any thoughts on how to resolve this issue?
Thanks,
Uri.