Define a macro for @available to have a workaround for Xcode 8

This commit is contained in:
hofman authored and GitHub committed 2019-03-13 22:51:14 +01:00
1 parent d540c6a1b9
commit 5d9f41142b
1 file changed
+6
+6
View File
@@ -22,3 +22,9 @@ typedef struct {
+ (NSString *)systemVersionString;
@end
#if defined(__clang_major__) && __clang_major__ >= 9
#define SUAVAILABLE(major, minor) @available(macOS major##.##minor, *)
#else
#define SUAVAILABLE(major, minor) [SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){major, minor, 0}]
#endif