No Description

FIRInstanceID+Private.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.h"
  17. #import "FIRInstanceIDCheckinService.h"
  18. /**
  19. * Internal API used by other Firebase SDK teams, including Messaging, Analytics and Remote config.
  20. */
  21. @interface FIRInstanceID (Private)
  22. /**
  23. * Return the cached checkin preferences on the disk. This is used internally only by Messaging.
  24. *
  25. * @return The cached checkin preferences on the client.
  26. */
  27. - (nullable FIRInstanceIDCheckinPreferences *)cachedCheckinPreferences;
  28. /**
  29. * Fetches checkin info for the app. If the app has valid cached checkin preferences
  30. * they are returned instead of making a network request.
  31. *
  32. * @param handler The completion handler to invoke once the request has completed.
  33. */
  34. - (void)fetchCheckinInfoWithHandler:(nullable FIRInstanceIDDeviceCheckinCompletion)handler;
  35. /**
  36. * Get the InstanceID for the app. If an ID was created before and cached
  37. * successfully we will return that ID. If no cached ID exists we create
  38. * a new ID, cache it and return that.
  39. *
  40. * This is a blocking call and should not really be called on the main thread.
  41. *
  42. * @param error The error object that represents the error while trying to
  43. * retrieve the instance id.
  44. *
  45. * @return The InstanceID for the app.
  46. */
  47. - (nullable NSString *)appInstanceID:(NSError *_Nullable *_Nullable)error;
  48. @end