Obj-C Binding not working properly.

AndreasHeckAndreasHeck DEMember
edited August 2015 in Xamarin.iOS

Hello,

I am facing this issue now for nearly 2 Days.
I need to communicate with a Pebble Watch. I tried to Bind the Official PebbleKit obj-c Framework into a C# Project with sharpie, but I did not get a useful result (detailed description).
Then I found this Project
I can use it in my project, but I can not get my Watch. I have the same Issue as he has

Can anyone explain why some functions are just not working after binding? And how can I solve this?
Is it even possible to bind that project?

any help would be greatly appreciated

Answers

  • NikiNiki BGMember ✭✭✭

    I'm not very proficient with Obj C bindings, but can you try to modify his project and remove the [Protocol] attribute from PBPebbleCentral? It may or may not work, but it would be worth a try.

  • AndreasHeckAndreasHeck DEMember

    Thanks for your Reply Niki.
    When I remove the [Protocol] Attribute, I get this Exception:
    You_Should_Not_Call_base_In_This_Method

    Before removing it, I have this generated Code:

    [Export ("defaultCentral")] [CompilerGenerated] public static PBPebbleCentral DefaultCentral () { return Runtime.GetNSObject<PBPebbleCentral> (ApiDefinition.Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("defaultCentral"))); }

    Looks like it should work...

Sign In or Register to comment.