Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 <Foundation/Foundation.h>
18
 
19
NS_ASSUME_NONNULL_BEGIN
20
 
21
FOUNDATION_EXPORT NSString *const kFIRMessagingDomain;
22
 
23
// FIRMessaging Internal Error Code
24
typedef NS_ENUM(NSUInteger, FIRMessagingErrorCode) {
25
  kFIRMessagingErrorCodeUnknown = 0,
26
 
27
  kFIRMessagingErrorCodeNetwork = 4,
28
 
29
  // Failed to perform device check in.
30
  kFIRMessagingErrorCodeRegistrarFailedToCheckIn = 6,
31
 
32
  kFIRMessagingErrorCodeInvalidRequest = 7,
33
 
34
  kFIRMessagingErrorCodeInvalidTopicName = 8,
35
 
36
  // FIRMessaging generic errors
37
  kFIRMessagingErrorCodeMissingDeviceID = 501,
38
  kFIRMessagingErrorCodeMissingAuthorizedEntity = 502,
39
  kFIRMessagingErrorCodeMissingScope = 503,
40
  kFIRMessagingErrorCodeMissingFid = 504,
41
 
42
  // Upstream send errors
43
  kFIRMessagingErrorCodeServiceNotAvailable = 1001,
44
  kFIRMessagingErrorCodeMissingTo = 1003,
45
  kFIRMessagingErrorCodeSave = 1004,
46
  kFIRMessagingErrorCodeSizeExceeded = 1005,
47
 
48
  kFIRMessagingErrorCodeInvalidIdentity = 2001,
49
 
50
  // PubSub errors
51
  kFIRMessagingErrorCodePubSubOperationIsCancelled = 3005,
52
};
53
 
54
@interface NSError (FIRMessaging)
55
 
56
+ (NSError *)messagingErrorWithCode:(FIRMessagingErrorCode)fcmErrorCode
57
                      failureReason:(NSString *)failureReason;
58
 
59
@end
60
 
61
NS_ASSUME_NONNULL_END