This does not require a compatibility layer (Darling) nor a toolchain (Theos). Instead, clang and lld from Linux distribution is used with iOS SDK to compile the natives part (C/Objective-C). Of course, this also allows compiling on Android with Termux or Windows with WSL.
12 lines
402 B
Objective-C
12 lines
402 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
// This is only compiled when building on non-Apple platforms
|
|
|
|
int __isPlatformVersionAtLeast(int platform, int major, int minor, int patch) {
|
|
NSOperatingSystemVersion version;
|
|
version.majorVersion = major;
|
|
version.minorVersion = minor;
|
|
version.patchVersion = patch;
|
|
return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:version];
|
|
}
|