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