FIRInstanceID+Private.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 "Firebase/InstanceID/Private/FIRInstanceID+Private.h"
  17. #import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
  18. #import "Firebase/InstanceID/FIRInstanceIDAuthService.h"
  19. #import "Firebase/InstanceID/FIRInstanceIDTokenManager.h"
  20. #import "Firebase/InstanceID/Private/FIRInstanceID_Private.h"
  21. @class FIRInstallations;
  22. @interface FIRInstanceID ()
  23. @property(nonatomic, readonly, strong) FIRInstanceIDTokenManager *tokenManager;
  24. @end
  25. #pragma clang diagnostic push
  26. #pragma clang diagnostic ignored "-Wdeprecated-implementations"
  27. @implementation FIRInstanceID (Private)
  28. #pragma clang diagnostic pop
  29. // This method just wraps our pre-configured auth service to make the request.
  30. // This method is only needed by first-party users, like Remote Config.
  31. - (void)fetchCheckinInfoWithHandler:(FIRInstanceIDDeviceCheckinCompletion)handler {
  32. [self.tokenManager.authService fetchCheckinInfoWithHandler:handler];
  33. }
  34. #pragma mark - Firebase Installations Compatibility
  35. /// Presence of this method indicates that this version of IID uses FirebaseInstallations under the
  36. /// hood. It is checked by FirebaseInstallations SDK.
  37. + (BOOL)usesFIS {
  38. return YES;
  39. }
  40. @end