Skip to content

Commit

Permalink
Fix Mac Catalyst errors (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie authored Dec 5, 2024
1 parent 81a80c9 commit 970e609
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/LKObjCHelpers/LKObjcCHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ @implementation LKObjCHelpers

NS_ASSUME_NONNULL_BEGIN

+ (void)finishBroadcastWithoutError:(RPBroadcastSampleHandler *)handler API_AVAILABLE(macos(11.0)) {
+ (void)finishBroadcastWithoutError:(RPBroadcastSampleHandler *)handler API_AVAILABLE(ios(10.0), macCatalyst(13.1), macos(11.0), tvos(10.0)) {
// Call finishBroadcastWithError with nil error, which ends the broadcast without an error popup
// This is unsupported/undocumented but appears to work and is preferable to an error dialog with a cryptic default message
// See https://stackoverflow.com/a/63402492 for more discussion
Expand Down
2 changes: 1 addition & 1 deletion Sources/LKObjCHelpers/include/LKObjcHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

@interface LKObjCHelpers : NSObject

+ (void)finishBroadcastWithoutError:(RPBroadcastSampleHandler *)handler API_AVAILABLE(macos(11.0));
+ (void)finishBroadcastWithoutError:(RPBroadcastSampleHandler *)handler API_AVAILABLE(ios(10.0), macCatalyst(13.1), macos(11.0), tvos(10.0));

@end
1 change: 1 addition & 0 deletions Sources/LiveKit/Broadcast/Uploader/LKSampleHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ReplayKit

import LKObjCHelpers

@available(macCatalyst 13.1, *)
open class LKSampleHandler: RPBroadcastSampleHandler {
private var clientConnection: BroadcastUploadSocketConnection?
private var uploader: SampleUploader?
Expand Down

0 comments on commit 970e609

Please sign in to comment.