1

I do understand that static classes can't declare instance members, however this is occurring as a result of the generation of the

Input to compiler: APIDefinition.cs

// @interface CallKitIntegration (TVOCall)
[Category]
[BaseType(typeof(TVOCall))]
interface TVOCall_CallKitIntegration
{
    // @property (nonatomic, strong) NSUUID * _Nonnull uuid;
    [Export("uuid", ArgumentSemantic.Strong)]
    NSUuid Uuid { get; set; } 

Intermediary compiler output: TVOCall_CallKitIntegration.g.cs

namespace TwilioVoiceBindingBeta19 {
public unsafe static partial class TVOCall_CallKitIntegration  {

    [CompilerGenerated]
    static readonly IntPtr class_ptr = Class.GetHandle ("TVOCall");

    [CompilerGenerated]
    public virtual NSUuid Uuid {
        [Export ("uuid", ArgumentSemantic.Retain)]
        get {
            NSUuid ret;
            if (IsDirectBinding) {
                ret =  Runtime.GetNSObject<NSUuid> (global::ApiDefinition.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.GetHandle ("uuid")));
            } else {
                ret =  Runtime.GetNSObject<NSUuid> (global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("uuid")));
            }
            return ret;
        }

enter image description here

What are the right changes to APIDefinition that result in correct generation of the g files?

makerofthings7
  • 60,103
  • 53
  • 215
  • 448
  • maybe helpful https://stackoverflow.com/questions/21870510/xamarin-binding-category-return-error-cannot-declare-instance-members-in-a-stat – ColeX Nov 02 '17 at 01:51

1 Answers1

1

change to this

// @interface CallKitIntegration (TVOCall)
[Category]
[BaseType(typeof(TVOCall))]
interface TVOCall_CallKitIntegration
{
  // @property (nonatomic, strong) NSUUID * _Nonnull uuid;
  [Export("uuid")]
  NSUuid Get_Uuid()

  [Export("setuuid:")]
  void Set_Uuid(NSUuid value);
Florian Doyon
  • 4,146
  • 1
  • 27
  • 37
sunyt
  • 309
  • 3
  • 7