Skip to content

Commit 7b1dd5d

Browse files
committed
macos webrtc import fix
1 parent 01b7f8f commit 7b1dd5d

25 files changed

+109
-6
lines changed

common/darwin/Classes/AudioManager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#import <Foundation/Foundation.h>
2+
#if TARGET_OS_IPHONE
23
#import <StreamWebRTC/StreamWebRTC.h>
4+
#elif TARGET_OS_MAC
5+
#import <WebRTC/WebRTC.h>
6+
#endif
37
#import "AudioProcessingAdapter.h"
48

59
@interface AudioManager : NSObject

common/darwin/Classes/AudioProcessingAdapter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#import <Foundation/Foundation.h>
2+
#if TARGET_OS_IPHONE
23
#import <StreamWebRTC/StreamWebRTC.h>
4+
#elif TARGET_OS_MAC
5+
#import <WebRTC/WebRTC.h>
6+
#endif
37

48
@protocol ExternalAudioProcessingDelegate
59

common/darwin/Classes/AudioProcessingAdapter.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#import "AudioProcessingAdapter.h"
2+
#if TARGET_OS_IPHONE
23
#import <StreamWebRTC/RTCAudioRenderer.h>
4+
#elif TARGET_OS_MAC
5+
#import <WebRTC/RTCAudioRenderer.h>
6+
#endif
37
#import <os/lock.h>
48

59
@implementation AudioProcessingAdapter {

common/darwin/Classes/AudioUtils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#if TARGET_OS_IPHONE
2-
32
#import <StreamWebRTC/StreamWebRTC.h>
43

54
@interface AudioUtils : NSObject

common/darwin/Classes/FlutterDataPacketCryptor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#import <FlutterMacOS/FlutterMacOS.h>
55
#endif
66

7+
#if TARGET_OS_IPHONE
78
#import <StreamWebRTC/StreamWebRTC.h>
9+
#elif TARGET_OS_MAC
10+
#import <WebRTC/WebRTC.h>
11+
#endif
812

913
#import "FlutterWebRTCPlugin.h"
1014

common/darwin/Classes/FlutterDataPacketCryptor.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#import "FlutterDataPacketCryptor.h"
22
#import "FlutterRTCFrameCryptor.h"
33

4-
#include <StreamWebRTC/StreamWebRTC.h>
4+
#if TARGET_OS_IPHONE
5+
#import <StreamWebRTC/StreamWebRTC.h>
6+
#elif TARGET_OS_MAC
7+
#import <WebRTC/WebRTC.h>
8+
#endif
59
#import <objc/runtime.h>
610

711
@implementation FlutterWebRTCPlugin (DataPacketCryptor)

common/darwin/Classes/FlutterRTCAudioSink.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#import <CoreMedia/CoreMedia.h>
22
#import <Foundation/Foundation.h>
3+
#if TARGET_OS_IPHONE
34
#import <StreamWebRTC/StreamWebRTC.h>
5+
#elif TARGET_OS_MAC
6+
#import <WebRTC/WebRTC.h>
7+
#endif
48

59
@interface FlutterRTCAudioSink : NSObject
610

common/darwin/Classes/FlutterRTCDataChannel.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#import "FlutterRTCDataChannel.h"
2+
#if TARGET_OS_IPHONE
23
#import <StreamWebRTC/RTCDataChannelConfiguration.h>
4+
#elif TARGET_OS_MAC
5+
#import <WebRTC/RTCDataChannelConfiguration.h>
6+
#endif
37
#import <objc/runtime.h>
48
#import "FlutterRTCPeerConnection.h"
59

common/darwin/Classes/FlutterRTCDesktopCapturer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#import <FlutterMacOS/FlutterMacOS.h>
55
#endif
66
#import <Foundation/Foundation.h>
7+
#if TARGET_OS_IPHONE
78
#import <StreamWebRTC/StreamWebRTC.h>
9+
#elif TARGET_OS_MAC
10+
#import <WebRTC/WebRTC.h>
11+
#endif
812

913
#import "FlutterWebRTCPlugin.h"
1014

common/darwin/Classes/FlutterRTCFrameCapturer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#if TARGET_OS_IPHONE
12
#import <StreamWebRTC/StreamWebRTC.h>
3+
#elif TARGET_OS_MAC
4+
#import <WebRTC/WebRTC.h>
5+
#endif
26

37
#if TARGET_OS_IPHONE
48
#import <Flutter/Flutter.h>

0 commit comments

Comments
 (0)