From 12a5e429e8fdd0cef049645de71f78625efa5cd7 Mon Sep 17 00:00:00 2001 From: Vincent Dondain Date: Mon, 29 Jan 2018 14:32:30 -0500 Subject: [PATCH] [avfoundation] Fix AVAudioUnitComponentManager default .ctor crash (#3314) (#3351) It looks like this should not have been bound since there's a singleton-like static property to use the type. Keeping binary compatibility. - Fixes github issue #3303: AVAudioUnitComponentManager default .ctor can crash on macOS 10.13.3 (https://github.com/xamarin/xamarin-macios/issues/3303) --- src/AVFoundation/AVCompat.cs | 8 ++++++++ src/avfoundation.cs | 1 + 2 files changed, 9 insertions(+) diff --git a/src/AVFoundation/AVCompat.cs b/src/AVFoundation/AVCompat.cs index 253b605e0d..ccf3a18cfe 100644 --- a/src/AVFoundation/AVCompat.cs +++ b/src/AVFoundation/AVCompat.cs @@ -92,6 +92,14 @@ namespace XamCore.AVFoundation { } } + partial class AVAudioUnitComponentManager { + + [Obsolete ("Please use the static 'SharedInstance' property as this type is not meant to be created.")] + public AVAudioUnitComponentManager () + { + } + } + #if !MONOMAC partial class AVSampleBufferAudioRenderer { diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 1a71ebd60c..ddf5a00a35 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -12212,6 +12212,7 @@ namespace XamCore.AVFoundation { [NoWatch, iOS (9,0), Mac (10,10)] [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // for binary compatibility this is added in AVCompat.cs w/[Obsolete] interface AVAudioUnitComponentManager { [Export ("tagNames")]