FIRMessagingConstants.m 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. #import "FirebaseMessaging/Sources/FIRMessagingConstants.h"
  17. NSString *const kFIRMessagingFromKey = @"from";
  18. NSString *const kFIRMessagingSendTo = @"google."
  19. @"to";
  20. NSString *const kFIRMessagingSendTTL = @"google."
  21. @"ttl";
  22. NSString *const kFIRMessagingSendDelay = @"google."
  23. @"delay";
  24. NSString *const kFIRMessagingSendMessageID = @"google."
  25. @"msg_id";
  26. NSString *const KFIRMessagingSendMessageAppData = @"google."
  27. @"data";
  28. NSString *const kFIRMessagingMessageInternalReservedKeyword = @"gcm.";
  29. NSString *const kFIRMessagingMessagePersistentIDKey = @"persistent_id";
  30. NSString *const kFIRMessagingMessageIDKey = @"gcm.message_id";
  31. NSString *const kFIRMessagingMessageAPNSContentAvailableKey = @"content-available";
  32. NSString *const kFIRMessagingMessageSyncMessageTTLKey = @"gcm."
  33. @"ttl";
  34. NSString *const kFIRMessagingMessageLinkKey = @"gcm."
  35. @"app_link";
  36. NSString *const kFIRMessagingSenderID = @"google.c.sender.id";
  37. NSString *const kFIRMessagingFID = @"google.c.fid";
  38. NSString *const kFIRMessagingAnalyticsComposerIdentifier = @"google.c.a.c_id";
  39. NSString *const kFIRMessagingAnalyticsMessageLabel = @"google.c.a.m_l";
  40. NSString *const kFIRMessagingAnalyticsComposerLabel = @"google.c.a.c_l";
  41. NSString *const kFIRMessagingProductID = @"google.product_id";
  42. NSString *const kFIRMessagingRemoteNotificationsProxyEnabledInfoPlistKey =
  43. @"FirebaseAppDelegateProxyEnabled";
  44. NSString *const kFIRMessagingSubDirectoryName = @"Google/FirebaseMessaging";
  45. // Notifications
  46. NSString *const kFIRMessagingCheckinFetchedNotification = @"com.google.gcm.notif-checkin-fetched";
  47. NSString *const kFIRMessagingAPNSTokenNotification = @"com.firebase.iid.notif.apns-token";
  48. NSString *const kFIRMessagingRegistrationTokenRefreshNotification =
  49. @"com.firebase.iid.notif.refresh-token";
  50. const int kFIRMessagingSendTtlDefault = 24 * 60 * 60; // 24 hours
  51. // Commands
  52. NSString *const kFIRMessaging_CMD_RST = @"RST";
  53. // NOTIFICATIONS
  54. NSString *const kFIRMessagingDefaultGCMTokenFailNotification =
  55. @"com.firebase.iid.notif.fcm-token-fail";
  56. // Miscellaneous
  57. NSString *const kFIRMessagingAllScopeIdentifier = @"iid-all";
  58. NSString *const kFIRMessagingDefaultTokenScope = @"*";
  59. NSString *const kFIRMessagingFIAMTokenScope = @"fiam";
  60. NSString *const kFIRMessagingInstanceIDSubDirectoryName = @"Google/FirebaseInstanceID";
  61. // Registration Options
  62. NSString *const kFIRMessagingTokenOptionsAPNSKey = @"apns_token";
  63. NSString *const kFIRMessagingTokenOptionsAPNSIsSandboxKey = @"apns_sandbox";
  64. NSString *const kFIRMessagingTokenOptionsFirebaseAppIDKey = @"gmp_app_id";
  65. NSString *const kFIRMessagingParamInstanceID = @"appid";
  66. NSString *const kFIRMessagingAPNSTokenType =
  67. @"APNSTokenType"; // APNS Token type key stored in user info.
  68. NSString *const kFIRMessagingAppDelegateProxyEnabledInfoPlistKey =
  69. @"FirebaseAppDelegateProxyEnabled";
  70. // iOS Keychain error https://forums.developer.apple.com/thread/4743
  71. // An undocumented error code hence need to be redeclared.
  72. const int kFIRMessagingSecMissingEntitlementErrorCode = -34018;