@@ -133,8 +133,8 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body {
133
133
134
134
RCT_EXPORT_METHOD (setPushToStartToken:(NSString *)activityType
135
135
withToken:(NSString *)token) {
136
+ #if !TARGET_OS_MACCATALYST
136
137
NSError * err=nil ;
137
-
138
138
if (@available (iOS 17.2 , *)) {
139
139
[OneSignalLiveActivitiesManagerImpl setPushToStartToken: activityType withToken: token error: &err];
140
140
if (err) {
@@ -143,11 +143,12 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body {
143
143
} else {
144
144
[OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot setPushToStartToken on iOS < 17.2" ]];
145
145
}
146
+ #endif
146
147
}
147
148
148
149
RCT_EXPORT_METHOD (removePushToStartToken:(NSString *)activityType) {
150
+ #if !TARGET_OS_MACCATALYST
149
151
NSError * err=nil ;
150
-
151
152
if (@available (iOS 17.2 , *)) {
152
153
[OneSignalLiveActivitiesManagerImpl removePushToStartToken: activityType error: &err];
153
154
if (err) {
@@ -156,11 +157,12 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body {
156
157
} else {
157
158
[OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot removePushToStartToken on iOS < 17.2" ]];
158
159
}
160
+ #endif
159
161
}
160
162
161
163
RCT_EXPORT_METHOD (setupDefaultLiveActivity:(NSDictionary * _Nullable)options) {
164
+ #if !TARGET_OS_MACCATALYST
162
165
LiveActivitySetupOptions *laOptions = nil ;
163
-
164
166
if (options != nil ) {
165
167
laOptions = [LiveActivitySetupOptions alloc ];
166
168
[laOptions setEnablePushToStart: [options[@" enablePushToStart" ] boolValue ]];
@@ -172,17 +174,19 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body {
172
174
} else {
173
175
[OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot setupDefault on iOS < 16.1" ]];
174
176
}
177
+ #endif
175
178
}
176
179
177
180
RCT_EXPORT_METHOD (startDefaultLiveActivity:(NSString *)activityId
178
181
withAttributes:(NSDictionary * _Nonnull)attributes
179
182
withContent:(NSDictionary * _Nonnull)content) {
180
-
183
+ # if !TARGET_OS_MACCATALYST
181
184
if (@available (iOS 16.1 , *)) {
182
185
[OneSignalLiveActivitiesManagerImpl startDefault: activityId attributes: attributes content: content];
183
186
} else {
184
187
[OneSignalLog onesignalLog: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" cannot startDefault on iOS < 16.1" ]];
185
188
}
189
+ #endif
186
190
}
187
191
188
192
RCT_EXPORT_METHOD (setPrivacyConsentGiven:(BOOL )granted) {
0 commit comments