diff --git a/AppCenter/AppCenter/Internals/Util/MSUtility.m b/AppCenter/AppCenter/Internals/Util/MSUtility.m index 44985126e5..2d29f3bba4 100644 --- a/AppCenter/AppCenter/Internals/Util/MSUtility.m +++ b/AppCenter/AppCenter/Internals/Util/MSUtility.m @@ -18,7 +18,12 @@ // SDK versioning. static ms_info_t appcenter_library_info __attribute__((section("__TEXT,__ms_ios,regular,no_dead_strip"))) = { - .info_version = 1, .ms_name = APP_CENTER_C_NAME, .ms_version = APP_CENTER_C_VERSION, .ms_build = APP_CENTER_C_BUILD}; +#if TARGET_OS_MACCATALYST + .info_version = 1, .ms_name = "maccatalyst", .ms_version = APP_CENTER_C_VERSION, .ms_build = APP_CENTER_C_BUILD +#else + .info_version = 1, .ms_name = APP_CENTER_C_NAME, .ms_version = APP_CENTER_C_VERSION, .ms_build = APP_CENTER_C_BUILD +#endif +}; @implementation MSUtility diff --git a/AppCenter/AppCenterTests/MSUtilityTests.m b/AppCenter/AppCenterTests/MSUtilityTests.m index 8ca9150351..f87c3c0090 100644 --- a/AppCenter/AppCenterTests/MSUtilityTests.m +++ b/AppCenter/AppCenterTests/MSUtilityTests.m @@ -36,10 +36,17 @@ - (void)tearDown { #pragma mark - MSUtility.h +#if TARGET_OS_MACCATALYST +- (void)testSdkName { + NSString *name = [NSString stringWithUTF8String:@"maccatalyst"]; + XCTAssertTrue([[MSUtility sdkName] isEqualToString:name]); +} +#else - (void)testSdkName { NSString *name = [NSString stringWithUTF8String:APP_CENTER_C_NAME]; XCTAssertTrue([[MSUtility sdkName] isEqualToString:name]); } +#endif - (void)testSdkVersion { NSString *version = [NSString stringWithUTF8String:APP_CENTER_C_VERSION];