@@ -62,6 +62,7 @@ void _oneSignalExitLiveActivity(const char* activityId, int hashCode, BooleanRes
6262
6363
6464 void _oneSignalSetupDefaultLiveActivity (const char * optionsJson) {
65+ #if !TARGET_OS_MACCATALYST
6566 LiveActivitySetupOptions *laOptions = nil ;
6667
6768 if (optionsJson) {
@@ -77,9 +78,11 @@ void _oneSignalSetupDefaultLiveActivity(const char* optionsJson) {
7778 } else {
7879 [OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot setupDefault on iOS < 16.1" ]];
7980 }
81+ #endif
8082 }
8183
8284 void _oneSignalStartDefaultLiveActivity (const char * activityId, const char * attributesJson, const char * contentJson) {
85+ #if !TARGET_OS_MACCATALYST
8386 if (@available (iOS 16.1 , *)) {
8487 NSDictionary *attributes = oneSignalDictionaryFromJsonString (attributesJson);
8588 NSDictionary *content = oneSignalDictionaryFromJsonString (contentJson);
@@ -88,9 +91,11 @@ void _oneSignalStartDefaultLiveActivity(const char* activityId, const char* attr
8891 } else {
8992 [OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot startDefault on iOS < 16.1" ]];
9093 }
94+ #endif
9195 }
9296
9397 void _oneSignalSetPushToStartToken (const char * activityType, const char * token) {
98+ #if !TARGET_OS_MACCATALYST
9499 NSError * err=nil ;
95100
96101 if (@available (iOS 17.2 , *)) {
@@ -101,9 +106,11 @@ void _oneSignalSetPushToStartToken(const char* activityType, const char* token)
101106 } else {
102107 [OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot setPushToStartToken on iOS < 17.2" ]];
103108 }
109+ #endif
104110 }
105111
106112 void _oneSignalRemovePushToStartToken (const char * activityType) {
113+ #if !TARGET_OS_MACCATALYST
107114 NSError * err=nil ;
108115 if (@available (iOS 17.2 , *)) {
109116 [OneSignalLiveActivitiesManagerImpl removePushToStartToken: TO_NSSTRING (activityType) error: &err];
@@ -114,5 +121,6 @@ void _oneSignalRemovePushToStartToken(const char* activityType) {
114121 } else {
115122 [OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot removePushToStartToken on iOS < 17.2" ]];
116123 }
124+ #endif
117125 }
118126}
0 commit comments