Skip to content

Commit

Permalink
Merge pull request #1613 from Teleprompter-llc/fix/mac-catalyst-target
Browse files Browse the repository at this point in the history
Fix: build issue where mac catalyst target had AVCaptureSession extension redeclaration
  • Loading branch information
shogo4405 authored Oct 31, 2024
2 parents 2f07d2d + 980c3c6 commit 4d19072
Showing 6 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Sources/Extension/AVCaptureSession+Extension.swift
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ extension AVCaptureSession {
}
}
}
#endif
#else

@available(tvOS 17.0, *)
extension AVCaptureSession {
@@ -36,4 +36,5 @@ extension AVCaptureSession {
}
}
}
#endif
// swiftlint:enable unused_setter_value
1 change: 1 addition & 0 deletions Sources/Mixer/AudioMixerByMultiTrack.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AVFoundation
import Foundation
import CoreAudio

final class AudioMixerByMultiTrack: AudioMixer {
private static let defaultSampleTime: AVAudioFramePosition = 0
1 change: 1 addition & 0 deletions Sources/Mixer/AudioMonitor.swift
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import AudioUnit
import AVFoundation
import CoreMedia
import Foundation
import CoreAudio

final class AudioMonitor {
var inputFormat: AVAudioFormat? {
1 change: 1 addition & 0 deletions Sources/Mixer/AudioRingBuffer.swift
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import Accelerate
import AVFoundation
import CoreMedia
import Foundation
import CoreAudio

final class AudioRingBuffer {
private static let bufferCounts: UInt32 = 16
2 changes: 1 addition & 1 deletion Sources/RTMP/RTMPStream.swift
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import UIKit
typealias View = UIView
#endif

#if canImport(AppKit)
#if canImport(AppKit) && !targetEnvironment(macCatalyst)
import AppKit
typealias View = NSView
#endif
2 changes: 1 addition & 1 deletion Sources/Screen/Shape.swift
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ final class RoundedSquareShape: Shape {
return nil
}
let path = CGPath(roundedRect: rect, cornerWidth: cornerRadius, cornerHeight: cornerRadius, transform: nil)
#if canImport(AppKit)
#if canImport(AppKit) && !targetEnvironment(macCatalyst)
context.setFillColor(NSColor.white.cgColor)
#endif
#if canImport(UIKit)

0 comments on commit 4d19072

Please sign in to comment.