Keine Beschreibung

FIRInstanceID+Private.m 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 "FIRInstanceID+Private.h"
  17. #import "FIRInstanceIDAuthService.h"
  18. #import "FIRInstanceIDKeyPairStore.h"
  19. #import "FIRInstanceIDTokenManager.h"
  20. @interface FIRInstanceID ()
  21. @property(nonatomic, readonly, strong) FIRInstanceIDTokenManager *tokenManager;
  22. @property(nonatomic, readonly, strong) FIRInstanceIDKeyPairStore *keyPairStore;
  23. @end
  24. @implementation FIRInstanceID (Private)
  25. // This method just wraps our pre-configured auth service to make the request.
  26. // This method is only needed by first-party users, like Remote Config.
  27. - (void)fetchCheckinInfoWithHandler:(FIRInstanceIDDeviceCheckinCompletion)handler {
  28. [self.tokenManager.authService fetchCheckinInfoWithHandler:handler];
  29. }
  30. - (NSString *)appInstanceID:(NSError **)error {
  31. return [self.keyPairStore appIdentityWithError:error];
  32. }
  33. @end