2016-04-21 6 views
1

Wenn ich die folgende Überschreibung der AppDelegate hinzufügen:AppDelegate NIDAction

public override void HandleAction(UIApplication application, string actionIdentifier, NSDictionary remoteNotificationInfo, [BlockProxy(typeof(NIDAction))] Action completionHandler) 
{ 
} 

ich die folgende Fehlermeldung:

Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'NIDAction' could not be found (are you missing a using directive or an assembly reference?) Notifi.iOS C:\development\notifi\Notifi\Notifi\Notifi.iOS\AppDelegate.cs 119 Active

Ich habe versucht, Informationen über NIDAction suchen, aber ich kann nicht etwas hilfreich finden - kann ich dieses Attribut entfernen?

+0

Das gleiche Problem hier. BlockProxy mit NIDAction wird automatisch zum Abschluss-Handler hinzugefügt, aber der Compiler kennt den Typ NIDAction nicht. Hast du darüber etwas herausgefunden? –

Antwort

0

Es ist nicht notwendig, Typen zu notieren, wenn Xamarin already does it in einer Signatur von jedem nativen Anruf.

tun Nur soviel:

public override void HandleAction (UIApplication application, string actionIdentifier, NSDictionary remoteNotificationInfo, Action completionHandler) 
{ 
    .... 
} 
+0

iccthedral danke für die Antwort - die Annotation wurde automatisch durch Code-Vervollständigung des Visual Studios hinzugefügt. Ich dachte, es wäre sicher zu entfernen, aber ich war neugierig, was das Attribut tut. – markpirvine

+0

Ah ok, ich hole dich. Es ist wahrscheinlich innerhalb von Xamarin.iOS Assembly. Vielleicht könnten Sie mehr darüber finden, wenn Sie diese Baugruppe durchsuchen würden. – nullpotent