Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Creating binding with MKAnnotation protocol

$
0
0

I am encountering some trouble while trying to create bindings for SticknFind sdk. the major problem is that there is the following declaration in objective c:

@interface LeBlutrackerDevice : LeDevice { CLLocationCoordinate2D _coord; }

@property (nonatomic,readonly,copy) NSString *title; @property (nonatomic,readonly,copy) NSString *subtitle; @property (nonatomic,readonly) CLLocationCoordinate2D coordinate;

@property (nonatomic, strong) NSString *svInfo; @property (nonatomic, strong) NSString *navInfo;

@property (nonatomic,readonly) enum LE_DEVICE_STATE state; @property (nonatomic,strong) id delegate; @property (readonly) BOOL bcKeyEnabled; - (BOOL) writeBroadcastKey: (NSData *) key;

@end

And this is what I am having in the ApiDefinition.cs :

[Model] [BaseType (typeof (LeDevice))] public partial interface LeBlutrackerDevice : MKAnnotation { [Export ("title", ArgumentSemantic.Copy)] string Title { get; }

[Export ("subtitle", ArgumentSemantic.Copy)]
string Subtitle { get; }

[Export ("coordinate")]
CLLocationCoordinate2D Coordinate { get; }

[Export ("svInfo", ArgumentSemantic.Retain)]
string SvInfo { get; set; }

[Export ("navInfo", ArgumentSemantic.Retain)]
string NavInfo { get; set; }

[Export ("state")]
LE_DEVICE_STATE State { get; }

[Export ("delegate", ArgumentSemantic.Retain)]
LeBlutrackerDeviceDelegate Delegate { get; set; }

[Export ("bcKeyEnabled")]
bool BcKeyEnabled { get; }

[Export ("writeBroadcastKey:")]
bool WriteBroadcastKey (NSData key);

}

This is giving me the following errors:

Target GenerateBindings:

ApiDefinition.cs(309,48): error CS0527: Type `MonoTouch.MapKit.MKAnnotation' in interface list is not an interface

ApiDefinition.cs(313,10): warning CS0108: SticknFind.LeBlutrackerDevice.Title' hides inherited memberMonoTouch.MapKit.MKAnnotation.Title'. Use the new keyword if hiding was intended

ApiDefinition.cs(316,10): warning CS0108: SticknFind.LeBlutrackerDevice.Subtitle' hides inherited memberMonoTouch.MapKit.MKAnnotation.Subtitle'. Use the new keyword if hiding was intended

ApiDefinition.cs(319,26): warning CS0108: SticknFind.LeBlutrackerDevice.Coordinate' hides inherited memberMonoTouch.MapKit.MKAnnotation.Coordinate'. Use the new keyword if hiding was intended

If I use the IMKAnnotation i get an error since coordinates is not market with [Export] attribute and I also noticed that in the interface not all the properties defined in the MKAnnotation protocol are defined.

What am i doing wrong?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>