説明なし

FIRInstanceIDCheckinPreferences.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2019 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 <Foundation/Foundation.h>
  17. /**
  18. * The preferences InstanceID loads from checkin server. The deviceID and secret that checkin
  19. * provides is used to authenticate all future requests to the server. Besides the deviceID
  20. * and secret the other information that checkin provides is stored in a plist on the device.
  21. * The deviceID and secret are persisted in the device keychain.
  22. */
  23. @interface FIRInstanceIDCheckinPreferences : NSObject
  24. /**
  25. * DeviceID and secretToken are the checkin auth credentials and are stored in the Keychain.
  26. */
  27. @property(nonatomic, readonly, copy) NSString *deviceID;
  28. @property(nonatomic, readonly, copy) NSString *secretToken;
  29. /**
  30. * All the other checkin preferences other than deviceID and secret are stored in a plist.
  31. */
  32. @property(nonatomic, readonly, copy) NSString *deviceDataVersion;
  33. @property(nonatomic, readonly, copy) NSString *digest;
  34. @property(nonatomic, readonly, copy) NSString *versionInfo;
  35. @property(nonatomic, readonly, assign) int64_t lastCheckinTimestampMillis;
  36. /**
  37. * The content retrieved from checkin server that should be persisted in a plist. This
  38. * doesn't contain the deviceID and secret which are stored in the Keychain since they
  39. * should be more private.
  40. *
  41. * @return The checkin preferences that should be persisted in a plist.
  42. */
  43. - (NSDictionary *)checkinPlistContents;
  44. /**
  45. * Return whether checkin info exists, valid or not.
  46. */
  47. - (BOOL)hasCheckinInfo;
  48. /**
  49. * Verify if checkin preferences are valid or not.
  50. *
  51. * @return YES if valid checkin preferences else NO.
  52. */
  53. - (BOOL)hasValidCheckinInfo;
  54. @end