RuntimeException when creating AVCapturePhotoOutput

Hi All,
I'm getting a runtime exception when calling
new AVCapturePhotoOutput();

in an Xamarin.Forms custom renderer library for iOS.

Any recomendations how to fix this?

Unhandled Exception:

ObjCRuntime.RuntimeException: Wrapper type 'AVFoundation.AVCapturePhotoOutput' is missing its native ObjectiveC class 'AVCapturePhotoOutput'. occurred

Thanks a lot

Alex

Details:

Wrapper type 'AVFoundation.AVCapturePhotoOutput' is missing its native ObjectiveC class 'AVCapturePhotoOutput'. (ObjCRuntime.RuntimeException)
at Registrar.DynamicRegistrar.OnRegisterType (Registrar.Registrar+ObjCType type) [0x00113] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/DynamicRegistrar.cs:788
at Registrar.Registrar.RegisterTypeUnsafe (System.Type type, System.Collections.Generic.List1[System.Exception]& exceptions) [0x010b6] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/Registrar.cs:1926 at Registrar.Registrar.RegisterType (System.Type type, System.Collections.Generic.List1[System.Exception]& exceptions) [0x00011] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/Registrar.cs:1100
at Registrar.DynamicRegistrar.Register (System.Type type) [0x00002] in /Users/builder/data/lanes/4691/d2270eec/source/xamari
n-macios/src/ObjCRuntime/DynamicRegistrar.cs:1129
at ObjCRuntime.Class.Register (System.Type type) [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/Class.cs:126
at ObjCRuntime.Class.GetHandle (System.Type type) [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/Class.cs:94
at Foundation.NSObject.AllocIfNeeded () [0x00015] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/Foundation/NSObject2.cs:478
at Foundation.NSObject..ctor (Foundation.NSObjectFlag x) [0x00006] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/Foundation/NSObject2.cs:116
at AVFoundation.AVCaptureOutput..ctor (Foundation.NSObjectFlag t) [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/build/ios/native/AVFoundation/AVCaptureOutput.g.cs:51
at AVFoundation.AVCapturePhotoOutput..ctor () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/build/ios/nativ
e/AVFoundation/AVCapturePhotoOutput.g.cs:53
at StandardControls.iOS.CameraRecorderRenderer.SetupPhotoOutput () [0x00001]

Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.14) Release
VisualStudio.15.Release/15.2.0+26430.14
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Enterprise

Visual Basic 2017 00369-60000-00001-AA218
Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA218
Microsoft Visual C# 2017

Visual C++ 2017 00369-60000-00001-AA218
Microsoft Visual C++ 2017

Visual F# 4.1 00369-60000-00001-AA218
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.6.00404.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30503.0
ASP.NET and Web Tools 2017

Common Azure Tools 1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JavaScript UWP Project System 2.0
JavaScript UWP Project System

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

TypeScript 2.2.2.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps 15.0.26430.06
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK 7.3.1.2 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Answers

  • AlanClarkAlanClark USForum Administrator, Xamarin Team Xamurai

    @AlexanderWitkowski.2264 Thanks for the information there. Please also include a repro so we can see your code and implementation. Hopefully then the community will be able to better assist.

Sign In or Register to comment.