FIRMessagingInterop.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright 2020 Google LLC
  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. NS_ASSUME_NONNULL_BEGIN
  18. /** Connector for bridging communication between Firebase SDKs and FIRMessaging API. */
  19. NS_SWIFT_NAME(MessagingInterop) @protocol FIRMessagingInterop
  20. /**
  21. * The FCM registration token is used to identify this device so that FCM can send notifications to
  22. * it. It is associated with your APNs token when the APNs token is supplied, so messages sent to
  23. * the FCM token will be delivered over APNs.
  24. *
  25. * The FCM registration token is sometimes refreshed automatically. In your FIRMessaging delegate,
  26. * the delegate method `messaging:didReceiveRegistrationToken:` will be called once a token is
  27. * available, or has been refreshed. Typically it should be called once per app start, but
  28. * may be called more often if the token is invalidated or updated.
  29. *
  30. * Once you have an FCM registration token, you should send it to your application server, so it can
  31. * use the FCM token to send notifications to your device.
  32. */
  33. @property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken);
  34. @end
  35. NS_ASSUME_NONNULL_END