Class TokenUtil

java.lang.Object
com.eatthepath.pushy.apns.util.TokenUtil

public class TokenUtil extends Object
A utility class for processing APNs token strings.
Author:
Jon Chambers
  • Method Details

    • sanitizeTokenString

      public static String sanitizeTokenString(String tokenString)
      Returns a "sanitized" version of the given token string suitable for sending to an APNs server. This method returns a version of the original string with all non-hexadecimal digits removed. This can be especially useful when dealing with strings produced with [NSData describe].
      Parameters:
      tokenString - the token string to sanitize
      Returns:
      a "sanitized" version of the given token string suitable for sending to an APNs server