FIRMessagingConstants.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright 2017 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. /**
  17. * Global constants to be put here.
  18. *
  19. */
  20. #import <Foundation/Foundation.h>
  21. #ifndef _FIRMessaging_CONSTANTS_H
  22. #define _FIRMessaging_CONSTANTS_H
  23. FOUNDATION_EXPORT NSString *const kFIRMessagingFromKey;
  24. FOUNDATION_EXPORT NSString *const kFIRMessagingMessageIDKey;
  25. FOUNDATION_EXPORT NSString *const kFIRMessagingMessageAPNSContentAvailableKey;
  26. FOUNDATION_EXPORT NSString *const kFIRMessagingMessageSyncMessageTTLKey;
  27. FOUNDATION_EXPORT NSString *const kFIRMessagingMessageLinkKey;
  28. FOUNDATION_EXPORT NSString *const kFIRMessagingSenderID;
  29. FOUNDATION_EXPORT NSString *const kFIRMessagingFID;
  30. FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsComposerIdentifier;
  31. FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsMessageLabel;
  32. FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsComposerLabel;
  33. FOUNDATION_EXPORT NSString *const kFIRMessagingProductID;
  34. FOUNDATION_EXPORT NSString *const kFIRMessagingRemoteNotificationsProxyEnabledInfoPlistKey;
  35. FOUNDATION_EXPORT NSString *const kFIRMessagingSubDirectoryName;
  36. #pragma mark - Notifications
  37. FOUNDATION_EXPORT NSString *const kFIRMessagingCheckinFetchedNotification;
  38. FOUNDATION_EXPORT NSString *const kFIRMessagingAPNSTokenNotification;
  39. FOUNDATION_EXPORT NSString *const kFIRMessagingDefaultGCMTokenFailNotification;
  40. FOUNDATION_EXPORT NSString *const kFIRMessagingRegistrationTokenRefreshNotification;
  41. FOUNDATION_EXPORT const int kFIRMessagingSendTtlDefault; // 24 hours
  42. /**
  43. * Value included in a structured response indicating an identity reset.
  44. */
  45. FOUNDATION_EXPORT NSString *const kFIRMessaging_CMD_RST;
  46. #pragma mark - Miscellaneous
  47. /// The scope used to save the IID "*" scope token. This is used for saving the
  48. /// IID auth token that we receive from the server. This feature was never
  49. /// implemented on the server side.
  50. FOUNDATION_EXPORT NSString *const kFIRMessagingAllScopeIdentifier;
  51. /// The scope used to save the IID "*" scope token.
  52. FOUNDATION_EXPORT NSString *const kFIRMessagingDefaultTokenScope;
  53. /// Denylisted "fiam" token scope.
  54. FOUNDATION_EXPORT NSString *const kFIRMessagingFIAMTokenScope;
  55. /// Subdirectory in search path directory to store InstanceID preferences.
  56. FOUNDATION_EXPORT NSString *const kFIRMessagingInstanceIDSubDirectoryName;
  57. /// The key for APNS token in options dictionary.
  58. FOUNDATION_EXPORT NSString *const kFIRMessagingTokenOptionsAPNSKey;
  59. /// The key for APNS token environment type in options dictionary.
  60. FOUNDATION_EXPORT NSString *const kFIRMessagingTokenOptionsAPNSIsSandboxKey;
  61. /// The key for GMP AppID sent in registration requests.
  62. FOUNDATION_EXPORT NSString *const kFIRMessagingTokenOptionsFirebaseAppIDKey;
  63. FOUNDATION_EXPORT NSString *const kFIRMessagingAPNSTokenType;
  64. /// The key to enable auto-register by swizzling AppDelegate's methods.
  65. FOUNDATION_EXPORT NSString *const kFIRMessagingAppDelegateProxyEnabledInfoPlistKey;
  66. /// Error code for missing entitlements in Keychain. iOS Keychain error
  67. /// https://forums.developer.apple.com/thread/4743
  68. FOUNDATION_EXPORT const int kFIRMessagingSecMissingEntitlementErrorCode;
  69. /// The key for InstallationID or InstanceID in token request.
  70. FOUNDATION_EXPORT NSString *const kFIRMessagingParamInstanceID;
  71. #endif