FIRInstanceID+Private.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 Firebase SDK teams by calling in reflection or internal teams.
  20. */
  21. // TODO(chliangGoogle) Rename this to Internal.
  22. @interface FIRInstanceID (Private)
  23. /**
  24. * Fetches checkin info for the app. If the app has valid cached checkin preferences
  25. * they are returned instead of making a network request.
  26. *
  27. * @param handler The completion handler to invoke once the request has completed.
  28. */
  29. - (void)fetchCheckinInfoWithHandler:(nullable FIRInstanceIDDeviceCheckinCompletion)handler;
  30. /**
  31. * Get the InstanceID for the app. If an ID was created before and cached
  32. * successfully we will return that ID. If no cached ID exists we create
  33. * a new ID, cache it and return that.
  34. *
  35. * This is a blocking call and should not really be called on the main thread.
  36. *
  37. * @param error The error object that represents the error while trying to
  38. * retrieve the instance id.
  39. *
  40. * @return The InstanceID for the app.
  41. */
  42. - (nullable NSString *)appInstanceID:(NSError *_Nullable *_Nullable)error;
  43. @end