Hello,
i have used Objective Sharpie to generate the ApiDefinition.cs and StructsAndEnums.cs for the Objective-C WebRTC library from Google. But when try to compile the iOS Binding Project i get the following error in a generated file:
Error CS0246: The type or namespace name `RTCEAGLVideoViewDelegate' could not be found. Are you missing an assembly reference? (CS0246)
The RTCEAGLVideoViewDelegate
interface is defined in the APIDefinition.cs
// @protocol RTCEAGLVideoViewDelegate [Protocol, Model] interface RTCEAGLVideoViewDelegate { // @required -(void)videoView:(RTCEAGLVideoView *)videoView didChangeVideoSize:(CGSize)size; [Abstract] [Export ("videoView:didChangeVideoSize:")] void DidChangeVideoSize (RTCEAGLVideoView videoView, CGSize size); }
but the interface in the generated RTCEAGLVideoViewDelegate.g.cs has the name IRTCEAGLVideoViewDelegate
. I think that is the problem, how can i achieve that both names match?
Answers
It works if a define a base type.
[BaseType (typeof(NSObject))]
Dude that saved my day. Thank you!