@drool said: Documentation can be found here: https://components.xamarin.com/gettingstarted/googleiosgcm but I failed when tried to set DeviceToken as a value for key Constants.RegisterAPNSOption. Has anyone succeeded?
The document has error.
var options = new NSDictionary();
change to
var options = new NSMutableDictionary();
SendUpStream
public void SendUpstreamMessage()
{
var msg = new NSMutableDictionary();
msg.SetValueForKey(new NSString("1234"), new NSString("userId"));
msg.SetValueForKey(new NSString("hello world"), new NSString("msg"));
var to = GCM_SENDER_ID + "@gcm.googleapis.com";
Service.SharedInstance.SendMessage(msg, to, (_messageId++).ToString());
}