diff --git a/Sources/Qonversion/Qonversion/Utils/QNDevice/QNDevice.m b/Sources/Qonversion/Qonversion/Utils/QNDevice/QNDevice.m index 15e0e9cf..3c098a13 100644 --- a/Sources/Qonversion/Qonversion/Utils/QNDevice/QNDevice.m +++ b/Sources/Qonversion/Qonversion/Utils/QNDevice/QNDevice.m @@ -323,6 +323,22 @@ + (NSString*)getVendorID:(int) maxAttempts { } + (NSString*)getPlatformString { +#if TARGET_OS_MACCATALYST + io_service_t service = IOServiceGetMatchingService(kIOMainPortDefault, + IOServiceMatching("IOPlatformExpertDevice")); + CFStringRef model = IORegistryEntryCreateCFProperty(service, + CFSTR("model"), + kCFAllocatorDefault, + 0); + + NSString *modelIdentifier = [[NSString alloc] initWithData:(__bridge NSData *)model + encoding:NSUTF8StringEncoding]; + + CFRelease(model); + IOObjectRelease(service); + + return modelIdentifier; +#else #if UI_DEVICE const char *sysctl_name = "hw.machine"; #else @@ -335,6 +351,7 @@ + (NSString*)getPlatformString { NSString *platform = [NSString stringWithUTF8String:machine]; free(machine); return platform; +#endif } + (NSString*)getDeviceModel {