diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index e5093214..b152a454 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - Additional instance of OneSignal error when calling OneSignal methods in Awake() +- iOS Mac Catalyst build error: Use of undeclared identifier 'OneSignalLiveActivitiesManagerImpl' ## [5.1.6] ### Fixed diff --git a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift index 2edbef04..5454c36b 100644 --- a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift +++ b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift @@ -5,6 +5,7 @@ // Created by Brian Smith on 5/29/24. // +#if !targetEnvironment(macCatalyst) import WidgetKit import SwiftUI @@ -14,3 +15,4 @@ struct ExampleWidgetBundle: WidgetBundle { ExampleWidgetLiveActivity() } } +#endif diff --git a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift index 5291428c..6d627f52 100644 --- a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift +++ b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift @@ -6,6 +6,7 @@ // Copyright © 2024 The Chromium Authors. All rights reserved. // +#if !targetEnvironment(macCatalyst) import ActivityKit import WidgetKit import SwiftUI @@ -64,3 +65,4 @@ struct ExampleWidgetLiveActivity: Widget { } } } +#endif diff --git a/com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml b/com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml index 983cc715..e88e91eb 100644 --- a/com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml +++ b/com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm b/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm index c6273fb1..fee816ae 100644 --- a/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm +++ b/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm @@ -62,6 +62,7 @@ void _oneSignalExitLiveActivity(const char* activityId, int hashCode, BooleanRes void _oneSignalSetupDefaultLiveActivity(const char* optionsJson) { + #if !TARGET_OS_MACCATALYST LiveActivitySetupOptions *laOptions = nil; if (optionsJson) { @@ -77,9 +78,11 @@ void _oneSignalSetupDefaultLiveActivity(const char* optionsJson) { } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot setupDefault on iOS < 16.1"]]; } + #endif } void _oneSignalStartDefaultLiveActivity(const char* activityId, const char* attributesJson, const char* contentJson) { + #if !TARGET_OS_MACCATALYST if (@available(iOS 16.1, *)) { NSDictionary *attributes = oneSignalDictionaryFromJsonString(attributesJson); NSDictionary *content = oneSignalDictionaryFromJsonString(contentJson); @@ -88,9 +91,11 @@ void _oneSignalStartDefaultLiveActivity(const char* activityId, const char* attr } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot startDefault on iOS < 16.1"]]; } + #endif } void _oneSignalSetPushToStartToken(const char* activityType, const char* token) { + #if !TARGET_OS_MACCATALYST NSError* err=nil; if (@available(iOS 17.2, *)) { @@ -101,9 +106,11 @@ void _oneSignalSetPushToStartToken(const char* activityType, const char* token) } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot setPushToStartToken on iOS < 17.2"]]; } + #endif } void _oneSignalRemovePushToStartToken(const char* activityType) { + #if !TARGET_OS_MACCATALYST NSError* err=nil; if (@available(iOS 17.2, *)) { [OneSignalLiveActivitiesManagerImpl removePushToStartToken:TO_NSSTRING(activityType) error:&err]; @@ -114,5 +121,6 @@ void _oneSignalRemovePushToStartToken(const char* activityType) { } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot removePushToStartToken on iOS < 17.2"]]; } + #endif } } \ No newline at end of file