I'm using Xamarin on iOS against an Azure Notification hub. Things have been working fine for a while. But, I recently added a new TAG to a collection of tags that I register my devices against.
Here is abbreviated code that WORKs:
NSSet tags = new NSSet("Email-some@some.com");
if (tags != null) {
Hub.RegisterNativeAsync(deviceToken, tags,(errorCallback) => {
if (errorCallback != null) {
new UIAlertView("RegisterNativeAsync error", "Unable to register for Push notifications", null, "OK", null).Show();
return;
}
});
}
However, if I replace the first line with this content, the RegisterNativeAsync FAILS:
NSSet tags = new NSSet("Email-no email provided for some user");
I receive this response:
URLRequest failed for { URL: https://MYNAMESPACE.servicebus.windows.net/MYNOTIFICATIONHUBNAME/Registrations/7659656661665513594-8491925189141493076-8?api-version=2013-04 } with status code: bad request
Are there formatting rules about tags? I have dozens of other tags with lots of types of content and have never run into this issue before.