Skip to content

Instantly share code, notes, and snippets.

@prashantvc
Created January 30, 2014 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prashantvc/f7b31a5da0aebe9b4c1e to your computer and use it in GitHub Desktop.
Save prashantvc/f7b31a5da0aebe9b4c1e to your computer and use it in GitHub Desktop.
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
string trimmedDeviceToken = deviceToken.Description;
if (!string.IsNullOrWhiteSpace(trimmedDeviceToken))
{
trimmedDeviceToken = trimmedDeviceToken.Trim('<');
trimmedDeviceToken = trimmedDeviceToken.Trim('>');
}
DeviceToken = trimmedDeviceToken;
}
@mciccotti
Copy link

Why not:

DeviceToken = deviceToken.Description.Trim('<').Trim('>');

@Denny966
Copy link

Denny966 commented Sep 7, 2018

I guess we'll never know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment