Bindind project cannot find attribute of type Basetype

I am trying to link the objective-c library. BaseType attribute could not be created!

I am following the tutorial on the Xamarin. I also tried searching on the web and I found some solutions like:

  • Someone said I haven't created a Xamarin ios binding project , but I have ApiDefinition.cs and StructsAndEnums.cs;

  • Set correct ObjcBindingApiDefinition ;

  • Uses Objective Sharpie but gets a lot of errors.

I can't remember anymore, but none of them work.


Here's the modified auto-generated code:

namespace BindingProject
    {
        using System;
        using System.Drawing;
        using System.Collections;

        using MonoTouch.CoreGraphics;
        using MonoTouch.CoreAnimation;

        using MonoTouch.ObjCRuntime;
        using MonoTouch.Foundation;
        using MonoTouch.UIKit;

        [**BaseType** (typeof (NSObject))]

        interface UIResponder {

        }
    }

      

I am creating a project going by solution:

  • FROM#
  • IOS
  • Choose Classic or Unified API (I can't remember now as both are of type)
  • I selected IOS Binding Project .

What I know, when I choose one, Classic or Unified, I cannot find any MonoTouch types.

+3


source to share


1 answer


MonoTouch types are classic API, your description uses a unified API. Xamarin now has two sets of APIs, please don't mix them together. You need to choose Classic API and follow its rule, or use Unified API and follow its own rule. The differences are mainly related to reference numbers, namespace and type.



http://developer.xamarin.com/guides/cross-platform/advanced/submitting_components/unified_components/

+1


source







All Articles