FIRInstallationsStoredItem.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #import "FIRInstallationsStatus.h"
  18. @class FIRInstallationsStoredAuthToken;
  19. NS_ASSUME_NONNULL_BEGIN
  20. /**
  21. * The class is supposed to be used by `FIRInstallationsStore` only. It is required to
  22. * serialize/deserialize the installation data into/from `NSData` to be stored in Keychain.
  23. *
  24. * WARNING: Modification of the class properties can lead to incompatibility with the stored data
  25. * encoded by the previous class versions. Any modification must be evaluated and, if it is really
  26. * needed, the `storageVersion` must be bumped and proper migration code added.
  27. */
  28. @interface FIRInstallationsStoredItem : NSObject <NSSecureCoding>
  29. /// A stable identifier that uniquely identifies the app instance.
  30. @property(nonatomic, copy, nullable) NSString *firebaseInstallationID;
  31. /// The `refreshToken` is used to authorize the auth token requests.
  32. @property(nonatomic, copy, nullable) NSString *refreshToken;
  33. @property(nonatomic, nullable) FIRInstallationsStoredAuthToken *authToken;
  34. @property(nonatomic) FIRInstallationsStatus registrationStatus;
  35. /// The version of local storage.
  36. @property(nonatomic) NSInteger storageVersion;
  37. @end
  38. NS_ASSUME_NONNULL_END