FIRAuthAPNSToken.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <TargetConditionals.h>
  17. #if !TARGET_OS_OSX
  18. #import <Foundation/Foundation.h>
  19. #import "FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthAPNSTokenType.h"
  20. NS_ASSUME_NONNULL_BEGIN
  21. /** @class FIRAuthAPNSToken
  22. @brief A data structure for an APNs token.
  23. */
  24. @interface FIRAuthAPNSToken : NSObject
  25. /** @property data
  26. @brief The APNs token data.
  27. */
  28. @property(nonatomic, strong, readonly) NSData *data;
  29. /** @property string
  30. @brief The uppercase hexadecimal string form of the APNs token data.
  31. */
  32. @property(nonatomic, strong, readonly) NSString *string;
  33. /** @property type
  34. @brief The APNs token type.
  35. */
  36. @property(nonatomic, assign, readonly) FIRAuthAPNSTokenType type;
  37. /** @fn initWithData:type:
  38. @brief Initializes the instance.
  39. @param data The APNs token data.
  40. @param type The APNs token type.
  41. @return The initialized instance.
  42. */
  43. - (instancetype)initWithData:(NSData *)data
  44. type:(FIRAuthAPNSTokenType)type NS_DESIGNATED_INITIALIZER;
  45. /** @fn init
  46. @brief Call @c initWithData:type: to get an instance of this class.
  47. */
  48. - (instancetype)init NS_UNAVAILABLE;
  49. @end
  50. NS_ASSUME_NONNULL_END
  51. #endif