Skip to content

Commit

Permalink
Empty out Live Activities files for mac catalyst
Browse files Browse the repository at this point in the history
* Effectively empty any file referencing ActivityKit in order to support Mac Catalyst builds
* See #1446 for details
  • Loading branch information
nan-li committed Jun 9, 2024
1 parent 1fe8993 commit 83f790c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
THE SOFTWARE.
*/

// Effectively blanks out this file for Mac Catalyst
#if targetEnvironment(macCatalyst)
#else

/**
A default struct conforming to OneSignalLiveActivityAttributes which is registered with OneSignal as a Live Activity
through `OneSignal.LiveActivities.setupDefault`. The only action required by the customer app is
Expand Down Expand Up @@ -74,3 +78,4 @@ public struct DefaultLiveActivityAttributes: OneSignalLiveActivityAttributes {
public var data: [String: AnyCodable]
public var onesignal: OneSignalLiveActivityAttributeData
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
THE SOFTWARE.
*/

// Effectively blanks out this file for Mac Catalyst
#if targetEnvironment(macCatalyst)
#else
import OneSignalOSCore
import ActivityKit

Expand Down Expand Up @@ -116,3 +119,4 @@ public class LiveActivitySetupOptions: NSObject {
self.enablePushToUpdate = enablePushToUpdate
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
THE SOFTWARE.
*/

// Effectively blanks out this file for Mac Catalyst
#if targetEnvironment(macCatalyst)
#else
import OneSignalCore
import OneSignalOSCore
import ActivityKit
Expand Down Expand Up @@ -238,3 +241,4 @@ public class OneSignalLiveActivitiesManagerImpl: NSObject, OSLiveActivities {
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
THE SOFTWARE.
*/

// Effectively blanks out this file for Mac Catalyst
#if targetEnvironment(macCatalyst)
#else
import ActivityKit

/**
Expand Down Expand Up @@ -83,3 +86,4 @@ public protocol OneSignalLiveActivityContentState: Decodable, Encodable, Hashabl
public struct OneSignalLiveActivityContentStateData: Decodable, Encodable, Hashable {
public var notificationId: String
}
#endif

0 comments on commit 83f790c

Please sign in to comment.