rho-tau-extensions 6.2.0 → 7.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/libs/crosswalk/ext/platform/android/Rakefile +19 -1
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/aarch64/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
- data/libs/fcm-push-18/ext.yml +20 -0
- data/libs/fcm-push-18/ext/android/AndroidManifest.rb +10 -0
- data/libs/fcm-push-18/ext/android/ApplicationManifestAdds.erb +39 -0
- data/libs/fcm-push-18/ext/android/Rakefile +187 -0
- data/libs/fcm-push-18/ext/android/ext_java.files +3 -0
- data/libs/fcm-push-18/ext/android/ext_native.files +1 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.cpp +215 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.h +74 -0
- data/libs/fcm-push-18/ext/android/res/res/values/fireBaseValues.xml +5 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +164 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +219 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +88 -0
- data/libs/fcm-push-18/ext/build +16 -0
- data/libs/fcm-push-18/ext/build.bat +8 -0
- data/libs/fcm-push-18/ext/fcm.xml +9 -0
- data/libs/fcm-push-18/ext/iphone/ApplePush_Prefix.pch +7 -0
- data/libs/fcm-push-18/ext/iphone/Firebase.h +68 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +62 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +115 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h +13 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +389 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +485 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +15 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/FirebaseCore +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +52 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRApp.h +130 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h +78 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h +35 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIROptions.h +133 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +6 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +276 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/FirebaseMessaging +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h +508 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap +8 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseNanoPB.framework/FirebaseNanoPB +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Protobuf +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/nanopb +0 -0
- data/libs/fcm-push-18/ext/iphone/Rakefile +81 -0
- data/libs/fcm-push-18/ext/iphone/fcm-push.xcodeproj/project.pbxproj +370 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.h +28 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.m +27 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.mm +234 -0
- data/libs/fcm-push-18/ext/iphone/impl/applePushSetup.c +10 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.h +69 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.mm +164 -0
- data/libs/fcm-push-18/ext/iphone/impl/readme.txt +7 -0
- data/libs/fcm-push-18/ext/platform/iphone/impl/readme.txt +7 -0
- data/libs/nodejs/ext/platform/android/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
- data/libs/rexml-edge/rexml/attlistdecl.rb +63 -0
- data/libs/rexml-edge/rexml/attribute.rb +192 -0
- data/libs/rexml-edge/rexml/cdata.rb +68 -0
- data/libs/rexml-edge/rexml/child.rb +97 -0
- data/libs/rexml-edge/rexml/comment.rb +80 -0
- data/libs/rexml-edge/rexml/doctype.rb +270 -0
- data/libs/rexml-edge/rexml/document.rb +291 -0
- data/libs/rexml-edge/rexml/dtd/attlistdecl.rb +11 -0
- data/libs/rexml-edge/rexml/dtd/dtd.rb +47 -0
- data/libs/rexml-edge/rexml/dtd/elementdecl.rb +18 -0
- data/libs/rexml-edge/rexml/dtd/entitydecl.rb +57 -0
- data/libs/rexml-edge/rexml/dtd/notationdecl.rb +40 -0
- data/libs/rexml-edge/rexml/element.rb +1241 -0
- data/libs/rexml-edge/rexml/encoding.rb +51 -0
- data/libs/rexml-edge/rexml/entity.rb +174 -0
- data/libs/rexml-edge/rexml/formatters/default.rb +112 -0
- data/libs/rexml-edge/rexml/formatters/pretty.rb +142 -0
- data/libs/rexml-edge/rexml/formatters/transitive.rb +58 -0
- data/libs/rexml-edge/rexml/functions.rb +418 -0
- data/libs/rexml-edge/rexml/instruction.rb +71 -0
- data/libs/rexml-edge/rexml/light/node.rb +196 -0
- data/libs/rexml-edge/rexml/namespace.rb +48 -0
- data/libs/rexml-edge/rexml/node.rb +76 -0
- data/libs/rexml-edge/rexml/output.rb +30 -0
- data/libs/rexml-edge/rexml/parent.rb +166 -0
- data/libs/rexml-edge/rexml/parseexception.rb +52 -0
- data/libs/rexml-edge/rexml/parsers/baseparser.rb +533 -0
- data/libs/rexml-edge/rexml/parsers/lightparser.rb +59 -0
- data/libs/rexml-edge/rexml/parsers/pullparser.rb +197 -0
- data/libs/rexml-edge/rexml/parsers/sax2parser.rb +273 -0
- data/libs/rexml-edge/rexml/parsers/streamparser.rb +61 -0
- data/libs/rexml-edge/rexml/parsers/treeparser.rb +101 -0
- data/libs/rexml-edge/rexml/parsers/ultralightparser.rb +57 -0
- data/libs/rexml-edge/rexml/parsers/xpathparser.rb +657 -0
- data/libs/rexml-edge/rexml/quickpath.rb +266 -0
- data/libs/rexml-edge/rexml/rexml.rb +32 -0
- data/libs/rexml-edge/rexml/sax2listener.rb +98 -0
- data/libs/rexml-edge/rexml/security.rb +28 -0
- data/libs/rexml-edge/rexml/source.rb +297 -0
- data/libs/rexml-edge/rexml/streamlistener.rb +93 -0
- data/libs/rexml-edge/rexml/syncenumerator.rb +33 -0
- data/libs/rexml-edge/rexml/text.rb +426 -0
- data/libs/rexml-edge/rexml/undefinednamespaceexception.rb +9 -0
- data/libs/rexml-edge/rexml/validation/relaxng.rb +539 -0
- data/libs/rexml-edge/rexml/validation/validation.rb +144 -0
- data/libs/rexml-edge/rexml/validation/validationexception.rb +10 -0
- data/libs/rexml-edge/rexml/xmldecl.rb +116 -0
- data/libs/rexml-edge/rexml/xmltokens.rb +85 -0
- data/libs/rexml-edge/rexml/xpath.rb +81 -0
- data/libs/rexml-edge/rexml/xpath_parser.rb +704 -0
- data/version +1 -1
- metadata +118 -2
Binary file
|
Binary file
|
data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h
ADDED
@@ -0,0 +1,276 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @memberof FIRInstanceID
|
5
|
+
*
|
6
|
+
* The scope to be used when fetching/deleting a token for Firebase Messaging.
|
7
|
+
*/
|
8
|
+
FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDScopeFirebaseMessaging
|
9
|
+
NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging);
|
10
|
+
|
11
|
+
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
|
12
|
+
/**
|
13
|
+
* Called when the system determines that tokens need to be refreshed.
|
14
|
+
* This method is also called if Instance ID has been reset in which
|
15
|
+
* case, tokens and FCM topic subscriptions also need to be refreshed.
|
16
|
+
*
|
17
|
+
* Instance ID service will throttle the refresh event across all devices
|
18
|
+
* to control the rate of token updates on application servers.
|
19
|
+
*/
|
20
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull kFIRInstanceIDTokenRefreshNotification
|
21
|
+
NS_SWIFT_NAME(InstanceIDTokenRefresh);
|
22
|
+
#else
|
23
|
+
/**
|
24
|
+
* Called when the system determines that tokens need to be refreshed.
|
25
|
+
* This method is also called if Instance ID has been reset in which
|
26
|
+
* case, tokens and FCM topic subscriptions also need to be refreshed.
|
27
|
+
*
|
28
|
+
* Instance ID service will throttle the refresh event across all devices
|
29
|
+
* to control the rate of token updates on application servers.
|
30
|
+
*/
|
31
|
+
FOUNDATION_EXPORT NSString * __nonnull const kFIRInstanceIDTokenRefreshNotification
|
32
|
+
NS_SWIFT_NAME(InstanceIDTokenRefreshNotification);
|
33
|
+
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @related FIRInstanceID
|
37
|
+
*
|
38
|
+
* The completion handler invoked when the InstanceID token returns. If
|
39
|
+
* the call fails we return the appropriate `error code` as described below.
|
40
|
+
*
|
41
|
+
* @param token The valid token as returned by InstanceID backend.
|
42
|
+
*
|
43
|
+
* @param error The error describing why generating a new token
|
44
|
+
* failed. See the error codes below for a more detailed
|
45
|
+
* description.
|
46
|
+
*/
|
47
|
+
typedef void(^FIRInstanceIDTokenHandler)( NSString * __nullable token, NSError * __nullable error)
|
48
|
+
NS_SWIFT_NAME(InstanceIDTokenHandler);
|
49
|
+
|
50
|
+
|
51
|
+
/**
|
52
|
+
* @related FIRInstanceID
|
53
|
+
*
|
54
|
+
* The completion handler invoked when the InstanceID `deleteToken` returns. If
|
55
|
+
* the call fails we return the appropriate `error code` as described below
|
56
|
+
*
|
57
|
+
* @param error The error describing why deleting the token failed.
|
58
|
+
* See the error codes below for a more detailed description.
|
59
|
+
*/
|
60
|
+
typedef void(^FIRInstanceIDDeleteTokenHandler)(NSError * __nullable error)
|
61
|
+
NS_SWIFT_NAME(InstanceIDDeleteTokenHandler);
|
62
|
+
|
63
|
+
/**
|
64
|
+
* @related FIRInstanceID
|
65
|
+
*
|
66
|
+
* The completion handler invoked when the app identity is created. If the
|
67
|
+
* identity wasn't created for some reason we return the appropriate error code.
|
68
|
+
*
|
69
|
+
* @param identity A valid identity for the app instance, nil if there was an error
|
70
|
+
* while creating an identity.
|
71
|
+
* @param error The error if fetching the identity fails else nil.
|
72
|
+
*/
|
73
|
+
typedef void(^FIRInstanceIDHandler)(NSString * __nullable identity, NSError * __nullable error)
|
74
|
+
NS_SWIFT_NAME(InstanceIDHandler);
|
75
|
+
|
76
|
+
/**
|
77
|
+
* @related FIRInstanceID
|
78
|
+
*
|
79
|
+
* The completion handler invoked when the app identity and all the tokens associated
|
80
|
+
* with it are deleted. Returns a valid error object in case of failure else nil.
|
81
|
+
*
|
82
|
+
* @param error The error if deleting the identity and all the tokens associated with
|
83
|
+
* it fails else nil.
|
84
|
+
*/
|
85
|
+
typedef void(^FIRInstanceIDDeleteHandler)(NSError * __nullable error)
|
86
|
+
NS_SWIFT_NAME(InstanceIDDeleteHandler);
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Public errors produced by InstanceID.
|
90
|
+
*/
|
91
|
+
typedef NS_ENUM(NSUInteger, FIRInstanceIDError) {
|
92
|
+
// Http related errors.
|
93
|
+
|
94
|
+
/// Unknown error.
|
95
|
+
FIRInstanceIDErrorUnknown = 0,
|
96
|
+
|
97
|
+
/// Auth Error -- GCM couldn't validate request from this client.
|
98
|
+
FIRInstanceIDErrorAuthentication = 1,
|
99
|
+
|
100
|
+
/// NoAccess -- InstanceID service cannot be accessed.
|
101
|
+
FIRInstanceIDErrorNoAccess = 2,
|
102
|
+
|
103
|
+
/// Timeout -- Request to InstanceID backend timed out.
|
104
|
+
FIRInstanceIDErrorTimeout = 3,
|
105
|
+
|
106
|
+
/// Network -- No network available to reach the servers.
|
107
|
+
FIRInstanceIDErrorNetwork = 4,
|
108
|
+
|
109
|
+
/// OperationInProgress -- Another similar operation in progress,
|
110
|
+
/// bailing this one.
|
111
|
+
FIRInstanceIDErrorOperationInProgress = 5,
|
112
|
+
|
113
|
+
/// InvalidRequest -- Some parameters of the request were invalid.
|
114
|
+
FIRInstanceIDErrorInvalidRequest = 7,
|
115
|
+
} NS_SWIFT_NAME(InstanceIDError);
|
116
|
+
|
117
|
+
/**
|
118
|
+
* The APNS token type for the app. If the token type is set to `UNKNOWN`
|
119
|
+
* InstanceID will implicitly try to figure out what the actual token type
|
120
|
+
* is from the provisioning profile.
|
121
|
+
*/
|
122
|
+
typedef NS_ENUM(NSInteger, FIRInstanceIDAPNSTokenType) {
|
123
|
+
/// Unknown token type.
|
124
|
+
FIRInstanceIDAPNSTokenTypeUnknown,
|
125
|
+
/// Sandbox token type.
|
126
|
+
FIRInstanceIDAPNSTokenTypeSandbox,
|
127
|
+
/// Production token type.
|
128
|
+
FIRInstanceIDAPNSTokenTypeProd,
|
129
|
+
} NS_SWIFT_NAME(InstanceIDAPNSTokenType)
|
130
|
+
__deprecated_enum_msg("Use FIRMessaging's APNSToken property instead.");
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Instance ID provides a unique identifier for each app instance and a mechanism
|
134
|
+
* to authenticate and authorize actions (for example, sending an FCM message).
|
135
|
+
*
|
136
|
+
* Instance ID is long lived but, may be reset if the device is not used for
|
137
|
+
* a long time or the Instance ID service detects a problem.
|
138
|
+
* If Instance ID is reset, the app will be notified via
|
139
|
+
* `kFIRInstanceIDTokenRefreshNotification`.
|
140
|
+
*
|
141
|
+
* If the Instance ID has become invalid, the app can request a new one and
|
142
|
+
* send it to the app server.
|
143
|
+
* To prove ownership of Instance ID and to allow servers to access data or
|
144
|
+
* services associated with the app, call
|
145
|
+
* `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
|
146
|
+
*/
|
147
|
+
NS_SWIFT_NAME(InstanceID)
|
148
|
+
@interface FIRInstanceID : NSObject
|
149
|
+
|
150
|
+
/**
|
151
|
+
* FIRInstanceID.
|
152
|
+
*
|
153
|
+
* @return A shared instance of FIRInstanceID.
|
154
|
+
*/
|
155
|
+
+ (nonnull instancetype)instanceID NS_SWIFT_NAME(instanceID());
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Unavailable. Use +instanceID instead.
|
159
|
+
*/
|
160
|
+
- (nonnull instancetype)init __attribute__((unavailable("Use +instanceID instead.")));
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Set APNS token for the application. This APNS token will be used to register
|
164
|
+
* with Firebase Messaging using `token` or
|
165
|
+
* `tokenWithAuthorizedEntity:scope:options:handler`. If the token type is set to
|
166
|
+
* `FIRInstanceIDAPNSTokenTypeUnknown` InstanceID will read the provisioning profile
|
167
|
+
* to find out the token type.
|
168
|
+
*
|
169
|
+
* @param token The APNS token for the application.
|
170
|
+
* @param type The APNS token type for the above token.
|
171
|
+
*/
|
172
|
+
- (void)setAPNSToken:(nonnull NSData *)token
|
173
|
+
type:(FIRInstanceIDAPNSTokenType)type
|
174
|
+
__deprecated_msg("Use FIRMessaging's APNSToken property instead.");
|
175
|
+
|
176
|
+
#pragma mark - Tokens
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Returns a Firebase Messaging scoped token for the firebase app.
|
180
|
+
*
|
181
|
+
* @return Null Returns null if the device has not yet been registerd with
|
182
|
+
* Firebase Message else returns a valid token.
|
183
|
+
*/
|
184
|
+
- (nullable NSString *)token;
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Returns a token that authorizes an Entity (example: cloud service) to perform
|
188
|
+
* an action on behalf of the application identified by Instance ID.
|
189
|
+
*
|
190
|
+
* This is similar to an OAuth2 token except, it applies to the
|
191
|
+
* application instance instead of a user.
|
192
|
+
*
|
193
|
+
* This is an asynchronous call. If the token fetching fails for some reason
|
194
|
+
* we invoke the completion callback with nil `token` and the appropriate
|
195
|
+
* error.
|
196
|
+
*
|
197
|
+
* Note, you can only have one `token` or `deleteToken` call for a given
|
198
|
+
* authorizedEntity and scope at any point of time. Making another such call with the
|
199
|
+
* same authorizedEntity and scope before the last one finishes will result in an
|
200
|
+
* error with code `OperationInProgress`.
|
201
|
+
*
|
202
|
+
* @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler:
|
203
|
+
*
|
204
|
+
* @param authorizedEntity Entity authorized by the token.
|
205
|
+
* @param scope Action authorized for authorizedEntity.
|
206
|
+
* @param options The extra options to be sent with your token request. The
|
207
|
+
* value for the `apns_token` should be the NSData object
|
208
|
+
* passed to the UIApplicationDelegate's
|
209
|
+
* `didRegisterForRemoteNotificationsWithDeviceToken` method.
|
210
|
+
* The value for `apns_sandbox` should be a boolean (or an
|
211
|
+
* NSNumber representing a BOOL in Objective C) set to true if
|
212
|
+
* your app is a debug build, which means that the APNs
|
213
|
+
* device token is for the sandbox environment. It should be
|
214
|
+
* set to false otherwise. If the `apns_sandbox` key is not
|
215
|
+
* provided, an automatically-detected value shall be used.
|
216
|
+
* @param handler The callback handler which is invoked when the token is
|
217
|
+
* successfully fetched. In case of success a valid `token` and
|
218
|
+
* `nil` error are returned. In case of any error the `token`
|
219
|
+
* is nil and a valid `error` is returned. The valid error
|
220
|
+
* codes have been documented above.
|
221
|
+
*/
|
222
|
+
- (void)tokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
|
223
|
+
scope:(nonnull NSString *)scope
|
224
|
+
options:(nullable NSDictionary *)options
|
225
|
+
handler:(nonnull FIRInstanceIDTokenHandler)handler;
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Revokes access to a scope (action) for an entity previously
|
229
|
+
* authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
|
230
|
+
*
|
231
|
+
* This is an asynchronous call. Call this on the main thread since InstanceID lib
|
232
|
+
* is not thread safe. In case token deletion fails for some reason we invoke the
|
233
|
+
* `handler` callback passed in with the appropriate error code.
|
234
|
+
*
|
235
|
+
* Note, you can only have one `token` or `deleteToken` call for a given
|
236
|
+
* authorizedEntity and scope at a point of time. Making another such call with the
|
237
|
+
* same authorizedEntity and scope before the last one finishes will result in an error
|
238
|
+
* with code `OperationInProgress`.
|
239
|
+
*
|
240
|
+
* @param authorizedEntity Entity that must no longer have access.
|
241
|
+
* @param scope Action that entity is no longer authorized to perform.
|
242
|
+
* @param handler The handler that is invoked once the unsubscribe call ends.
|
243
|
+
* In case of error an appropriate error object is returned
|
244
|
+
* else error is nil.
|
245
|
+
*/
|
246
|
+
- (void)deleteTokenWithAuthorizedEntity:(nonnull NSString *)authorizedEntity
|
247
|
+
scope:(nonnull NSString *)scope
|
248
|
+
handler:(nonnull FIRInstanceIDDeleteTokenHandler)handler;
|
249
|
+
|
250
|
+
#pragma mark - Identity
|
251
|
+
|
252
|
+
/**
|
253
|
+
* Asynchronously fetch a stable identifier that uniquely identifies the app
|
254
|
+
* instance. If the identifier has been revoked or has expired, this method will
|
255
|
+
* return a new identifier.
|
256
|
+
*
|
257
|
+
*
|
258
|
+
* @param handler The handler to invoke once the identifier has been fetched.
|
259
|
+
* In case of error an appropriate error object is returned else
|
260
|
+
* a valid identifier is returned and a valid identifier for the
|
261
|
+
* application instance.
|
262
|
+
*/
|
263
|
+
- (void)getIDWithHandler:(nonnull FIRInstanceIDHandler)handler
|
264
|
+
NS_SWIFT_NAME(getID(handler:));
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Resets Instance ID and revokes all tokens.
|
268
|
+
*
|
269
|
+
* This method also triggers a request to fetch a new Instance ID and Firebase Messaging scope
|
270
|
+
* token. Please listen to kFIRInstanceIDTokenRefreshNotification when the new ID and token are
|
271
|
+
* ready.
|
272
|
+
*/
|
273
|
+
- (void)deleteIDWithHandler:(nonnull FIRInstanceIDDeleteHandler)handler
|
274
|
+
NS_SWIFT_NAME(deleteID(handler:));
|
275
|
+
|
276
|
+
@end
|
@@ -0,0 +1 @@
|
|
1
|
+
#import "FIRInstanceID.h"
|
Binary file
|
data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h
ADDED
@@ -0,0 +1,508 @@
|
|
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
|
+
/**
|
20
|
+
* @related FIRMessaging
|
21
|
+
*
|
22
|
+
* The completion handler invoked when the registration token returns.
|
23
|
+
* If the call fails we return the appropriate `error code`, described by
|
24
|
+
* `FIRMessagingError`.
|
25
|
+
*
|
26
|
+
* @param FCMToken The valid registration token returned by FCM.
|
27
|
+
* @param error The error describing why a token request failed. The error code
|
28
|
+
* will match a value from the FIRMessagingError enumeration.
|
29
|
+
*/
|
30
|
+
typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken,
|
31
|
+
NSError * _Nullable error)
|
32
|
+
NS_SWIFT_NAME(MessagingFCMTokenFetchCompletion);
|
33
|
+
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @related FIRMessaging
|
37
|
+
*
|
38
|
+
* The completion handler invoked when the registration token deletion request is
|
39
|
+
* completed. If the call fails we return the appropriate `error code`, described
|
40
|
+
* by `FIRMessagingError`.
|
41
|
+
*
|
42
|
+
* @param error The error describing why a token deletion failed. The error code
|
43
|
+
* will match a value from the FIRMessagingError enumeration.
|
44
|
+
*/
|
45
|
+
typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error)
|
46
|
+
NS_SWIFT_NAME(MessagingDeleteFCMTokenCompletion);
|
47
|
+
|
48
|
+
/**
|
49
|
+
* The completion handler invoked once the data connection with FIRMessaging is
|
50
|
+
* established. The data connection is used to send a continous stream of
|
51
|
+
* data and all the FIRMessaging data notifications arrive through this connection.
|
52
|
+
* Once the connection is established we invoke the callback with `nil` error.
|
53
|
+
* Correspondingly if we get an error while trying to establish a connection
|
54
|
+
* we invoke the handler with an appropriate error object and do an
|
55
|
+
* exponential backoff to try and connect again unless successful.
|
56
|
+
*
|
57
|
+
* @param error The error object if any describing why the data connection
|
58
|
+
* to FIRMessaging failed.
|
59
|
+
*/
|
60
|
+
typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error)
|
61
|
+
NS_SWIFT_NAME(MessagingConnectCompletion)
|
62
|
+
__deprecated_msg("Please listen for the FIRMessagingConnectionStateChangedNotification "
|
63
|
+
"NSNotification instead.");
|
64
|
+
|
65
|
+
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
|
66
|
+
/**
|
67
|
+
* Notification sent when the upstream message has been delivered
|
68
|
+
* successfully to the server. The notification object will be the messageID
|
69
|
+
* of the successfully delivered message.
|
70
|
+
*/
|
71
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendSuccessNotification
|
72
|
+
NS_SWIFT_NAME(MessagingSendSuccess);
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Notification sent when the upstream message was failed to be sent to the
|
76
|
+
* server. The notification object will be the messageID of the failed
|
77
|
+
* message. The userInfo dictionary will contain the relevant error
|
78
|
+
* information for the failure.
|
79
|
+
*/
|
80
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendErrorNotification
|
81
|
+
NS_SWIFT_NAME(MessagingSendError);
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Notification sent when the Firebase messaging server deletes pending
|
85
|
+
* messages due to exceeded storage limits. This may occur, for example, when
|
86
|
+
* the device cannot be reached for an extended period of time.
|
87
|
+
*
|
88
|
+
* It is recommended to retrieve any missing messages directly from the
|
89
|
+
* server.
|
90
|
+
*/
|
91
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingMessagesDeletedNotification
|
92
|
+
NS_SWIFT_NAME(MessagingMessagesDeleted);
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Notification sent when Firebase Messaging establishes or disconnects from
|
96
|
+
* an FCM socket connection. You can query the connection state in this
|
97
|
+
* notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
|
98
|
+
*/
|
99
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingConnectionStateChangedNotification
|
100
|
+
NS_SWIFT_NAME(MessagingConnectionStateChanged);
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Notification sent when the FCM registration token has been refreshed. Please use the
|
104
|
+
* FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and
|
105
|
+
* updated tokens.
|
106
|
+
*/
|
107
|
+
FOUNDATION_EXPORT const NSNotificationName __nonnull
|
108
|
+
FIRMessagingRegistrationTokenRefreshedNotification
|
109
|
+
NS_SWIFT_NAME(MessagingRegistrationTokenRefreshed);
|
110
|
+
#else
|
111
|
+
/**
|
112
|
+
* Notification sent when the upstream message has been delivered
|
113
|
+
* successfully to the server. The notification object will be the messageID
|
114
|
+
* of the successfully delivered message.
|
115
|
+
*/
|
116
|
+
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendSuccessNotification
|
117
|
+
NS_SWIFT_NAME(MessagingSendSuccessNotification);
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Notification sent when the upstream message was failed to be sent to the
|
121
|
+
* server. The notification object will be the messageID of the failed
|
122
|
+
* message. The userInfo dictionary will contain the relevant error
|
123
|
+
* information for the failure.
|
124
|
+
*/
|
125
|
+
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendErrorNotification
|
126
|
+
NS_SWIFT_NAME(MessagingSendErrorNotification);
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Notification sent when the Firebase messaging server deletes pending
|
130
|
+
* messages due to exceeded storage limits. This may occur, for example, when
|
131
|
+
* the device cannot be reached for an extended period of time.
|
132
|
+
*
|
133
|
+
* It is recommended to retrieve any missing messages directly from the
|
134
|
+
* server.
|
135
|
+
*/
|
136
|
+
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingMessagesDeletedNotification
|
137
|
+
NS_SWIFT_NAME(MessagingMessagesDeletedNotification);
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Notification sent when Firebase Messaging establishes or disconnects from
|
141
|
+
* an FCM socket connection. You can query the connection state in this
|
142
|
+
* notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
|
143
|
+
*/
|
144
|
+
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingConnectionStateChangedNotification
|
145
|
+
NS_SWIFT_NAME(MessagingConnectionStateChangedNotification);
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Notification sent when the FCM registration token has been refreshed. Please use the
|
149
|
+
* FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and
|
150
|
+
* updated tokens.
|
151
|
+
*/
|
152
|
+
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingRegistrationTokenRefreshedNotification
|
153
|
+
NS_SWIFT_NAME(MessagingRegistrationTokenRefreshedNotification);
|
154
|
+
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
|
155
|
+
|
156
|
+
/**
|
157
|
+
* @enum FIRMessagingError
|
158
|
+
*/
|
159
|
+
typedef NS_ENUM(NSUInteger, FIRMessagingError) {
|
160
|
+
/// Unknown error.
|
161
|
+
FIRMessagingErrorUnknown = 0,
|
162
|
+
|
163
|
+
/// FIRMessaging couldn't validate request from this client.
|
164
|
+
FIRMessagingErrorAuthentication = 1,
|
165
|
+
|
166
|
+
/// InstanceID service cannot be accessed.
|
167
|
+
FIRMessagingErrorNoAccess = 2,
|
168
|
+
|
169
|
+
/// Request to InstanceID backend timed out.
|
170
|
+
FIRMessagingErrorTimeout = 3,
|
171
|
+
|
172
|
+
/// No network available to reach the servers.
|
173
|
+
FIRMessagingErrorNetwork = 4,
|
174
|
+
|
175
|
+
/// Another similar operation in progress, bailing this one.
|
176
|
+
FIRMessagingErrorOperationInProgress = 5,
|
177
|
+
|
178
|
+
/// Some parameters of the request were invalid.
|
179
|
+
FIRMessagingErrorInvalidRequest = 7,
|
180
|
+
} NS_SWIFT_NAME(MessagingError);
|
181
|
+
|
182
|
+
/// Status for the downstream message received by the app.
|
183
|
+
typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) {
|
184
|
+
/// Unknown status.
|
185
|
+
FIRMessagingMessageStatusUnknown,
|
186
|
+
/// New downstream message received by the app.
|
187
|
+
FIRMessagingMessageStatusNew,
|
188
|
+
} NS_SWIFT_NAME(MessagingMessageStatus);
|
189
|
+
|
190
|
+
/**
|
191
|
+
* The APNS token type for the app. If the token type is set to `UNKNOWN`
|
192
|
+
* Firebase Messaging will implicitly try to figure out what the actual token type
|
193
|
+
* is from the provisioning profile.
|
194
|
+
* Unless you really need to specify the type, you should use the `APNSToken`
|
195
|
+
* property instead.
|
196
|
+
*/
|
197
|
+
typedef NS_ENUM(NSInteger, FIRMessagingAPNSTokenType) {
|
198
|
+
/// Unknown token type.
|
199
|
+
FIRMessagingAPNSTokenTypeUnknown,
|
200
|
+
/// Sandbox token type.
|
201
|
+
FIRMessagingAPNSTokenTypeSandbox,
|
202
|
+
/// Production token type.
|
203
|
+
FIRMessagingAPNSTokenTypeProd,
|
204
|
+
} NS_SWIFT_NAME(MessagingAPNSTokenType);
|
205
|
+
|
206
|
+
/// Information about a downstream message received by the app.
|
207
|
+
NS_SWIFT_NAME(MessagingMessageInfo)
|
208
|
+
@interface FIRMessagingMessageInfo : NSObject
|
209
|
+
|
210
|
+
/// The status of the downstream message
|
211
|
+
@property(nonatomic, readonly, assign) FIRMessagingMessageStatus status;
|
212
|
+
|
213
|
+
@end
|
214
|
+
|
215
|
+
/**
|
216
|
+
* A remote data message received by the app via FCM (not just the APNs interface).
|
217
|
+
*
|
218
|
+
* This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use
|
219
|
+
* the local and remote notifications handlers defined in UIApplicationDelegate protocol.
|
220
|
+
*/
|
221
|
+
NS_SWIFT_NAME(MessagingRemoteMessage)
|
222
|
+
@interface FIRMessagingRemoteMessage : NSObject
|
223
|
+
|
224
|
+
/// The downstream message received by the application.
|
225
|
+
@property(nonatomic, readonly, strong, nonnull) NSDictionary *appData;
|
226
|
+
@end
|
227
|
+
|
228
|
+
@class FIRMessaging;
|
229
|
+
/**
|
230
|
+
* A protocol to handle events from FCM for devices running iOS 10 or above.
|
231
|
+
*
|
232
|
+
* To support devices running iOS 9 or below, use the local and remote notifications handlers
|
233
|
+
* defined in UIApplicationDelegate protocol.
|
234
|
+
*/
|
235
|
+
NS_SWIFT_NAME(MessagingDelegate)
|
236
|
+
@protocol FIRMessagingDelegate <NSObject>
|
237
|
+
|
238
|
+
@optional
|
239
|
+
/// This method will be called once a token is available, or has been refreshed. Typically it
|
240
|
+
/// will be called once per app start, but may be called more often, if token is invalidated or
|
241
|
+
/// updated. In this method, you should perform operations such as:
|
242
|
+
///
|
243
|
+
/// * Uploading the FCM token to your application server, so targeted notifications can be sent.
|
244
|
+
///
|
245
|
+
/// * Subscribing to any topics.
|
246
|
+
- (void)messaging:(nonnull FIRMessaging *)messaging
|
247
|
+
didReceiveRegistrationToken:(nonnull NSString *)fcmToken
|
248
|
+
NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:));
|
249
|
+
|
250
|
+
/// This method will be called whenever FCM receives a new, default FCM token for your
|
251
|
+
/// Firebase project's Sender ID. This method is deprecated. Please use
|
252
|
+
/// `messaging:didReceiveRegistrationToken:`.
|
253
|
+
- (void)messaging:(nonnull FIRMessaging *)messaging
|
254
|
+
didRefreshRegistrationToken:(nonnull NSString *)fcmToken
|
255
|
+
NS_SWIFT_NAME(messaging(_:didRefreshRegistrationToken:))
|
256
|
+
__deprecated_msg("Please use messaging:didReceiveRegistrationToken:, which is called for both \
|
257
|
+
current and refreshed tokens.");
|
258
|
+
|
259
|
+
/// This method is called on iOS 10 devices to handle data messages received via FCM through its
|
260
|
+
/// direct channel (not via APNS). For iOS 9 and below, the FCM data message is delivered via the
|
261
|
+
/// UIApplicationDelegate's -application:didReceiveRemoteNotification: method.
|
262
|
+
- (void)messaging:(nonnull FIRMessaging *)messaging
|
263
|
+
didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage
|
264
|
+
NS_SWIFT_NAME(messaging(_:didReceive:))
|
265
|
+
__IOS_AVAILABLE(10.0);
|
266
|
+
|
267
|
+
/// The callback to handle data message received via FCM for devices running iOS 10 or above.
|
268
|
+
- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage
|
269
|
+
NS_SWIFT_NAME(application(received:))
|
270
|
+
__deprecated_msg("Use FIRMessagingDelegate’s -messaging:didReceiveMessage:");
|
271
|
+
|
272
|
+
@end
|
273
|
+
|
274
|
+
/**
|
275
|
+
* Firebase Messaging lets you reliably deliver messages at no cost.
|
276
|
+
*
|
277
|
+
* To send or receive messages, the app must get a
|
278
|
+
* registration token from FIRInstanceID. This token authorizes an
|
279
|
+
* app server to send messages to an app instance.
|
280
|
+
*
|
281
|
+
* In order to receive FIRMessaging messages, declare `application:didReceiveRemoteNotification:`.
|
282
|
+
*/
|
283
|
+
NS_SWIFT_NAME(Messaging)
|
284
|
+
@interface FIRMessaging : NSObject
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Delegate to handle FCM token refreshes, and remote data messages received via FCM for devices
|
288
|
+
* running iOS 10 or above.
|
289
|
+
*/
|
290
|
+
@property(nonatomic, weak, nullable) id<FIRMessagingDelegate> delegate;
|
291
|
+
|
292
|
+
/**
|
293
|
+
* Delegate to handle remote data messages received via FCM for devices running iOS 10 or above.
|
294
|
+
*/
|
295
|
+
@property(nonatomic, weak, nullable) id<FIRMessagingDelegate> remoteMessageDelegate
|
296
|
+
__deprecated_msg("Use 'delegate' property");
|
297
|
+
|
298
|
+
/**
|
299
|
+
* When set to `YES`, Firebase Messaging will automatically establish a socket-based, direct
|
300
|
+
* channel to the FCM server. Enable this only if you are sending upstream messages or
|
301
|
+
* receiving non-APNS, data-only messages in foregrounded apps.
|
302
|
+
* Default is `NO`.
|
303
|
+
*/
|
304
|
+
@property(nonatomic) BOOL shouldEstablishDirectChannel;
|
305
|
+
|
306
|
+
/**
|
307
|
+
* Returns `YES` if the direct channel to the FCM server is active, and `NO` otherwise.
|
308
|
+
*/
|
309
|
+
@property(nonatomic, readonly) BOOL isDirectChannelEstablished;
|
310
|
+
|
311
|
+
/**
|
312
|
+
* FIRMessaging
|
313
|
+
*
|
314
|
+
* @return An instance of FIRMessaging.
|
315
|
+
*/
|
316
|
+
+ (nonnull instancetype)messaging NS_SWIFT_NAME(messaging());
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Unavailable. Use +messaging instead.
|
320
|
+
*/
|
321
|
+
- (nonnull instancetype)init __attribute__((unavailable("Use +messaging instead.")));
|
322
|
+
|
323
|
+
#pragma mark - APNS
|
324
|
+
|
325
|
+
/**
|
326
|
+
* This property is used to set the APNS Token received by the application delegate.
|
327
|
+
*
|
328
|
+
* FIRMessaging uses method swizzling to ensure that the APNS token is set
|
329
|
+
* automatically. However, if you have disabled swizzling by setting
|
330
|
+
* `FirebaseAppDelegateProxyEnabled` to `NO` in your app's
|
331
|
+
* Info.plist, you should manually set the APNS token in your application
|
332
|
+
* delegate's `-application:didRegisterForRemoteNotificationsWithDeviceToken:`
|
333
|
+
* method.
|
334
|
+
*
|
335
|
+
* If you would like to set the type of the APNS token, rather than relying on
|
336
|
+
* automatic detection, see: `-setAPNSToken:type:`.
|
337
|
+
*/
|
338
|
+
@property(nonatomic, copy, nullable) NSData *APNSToken NS_SWIFT_NAME(apnsToken);
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Set APNS token for the application. This APNS token will be used to register
|
342
|
+
* with Firebase Messaging using `FCMToken` or
|
343
|
+
* `tokenWithAuthorizedEntity:scope:options:handler`.
|
344
|
+
*
|
345
|
+
* @param apnsToken The APNS token for the application.
|
346
|
+
* @param type The type of APNS token. Debug builds should use
|
347
|
+
* FIRMessagingAPNSTokenTypeSandbox. Alternatively, you can supply
|
348
|
+
* FIRMessagingAPNSTokenTypeUnknown to have the type automatically
|
349
|
+
* detected based on your provisioning profile.
|
350
|
+
*/
|
351
|
+
- (void)setAPNSToken:(nonnull NSData *)apnsToken type:(FIRMessagingAPNSTokenType)type;
|
352
|
+
|
353
|
+
#pragma mark - FCM Tokens
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Is Firebase Messaging token auto generation enabled? If this flag is disabled,
|
357
|
+
* Firebase Messaging will not generate token automatically for message delivery.
|
358
|
+
*
|
359
|
+
* This setting is persisted, and is applied on future
|
360
|
+
* invocations of your application. Once explicitly set, it overrides any
|
361
|
+
* settings in your Info.plist.
|
362
|
+
*
|
363
|
+
* By default, FCM automatic initialization is enabled. If you need to change the
|
364
|
+
* default (for example, because you want to prompt the user before getting token)
|
365
|
+
* set FirebaseMessagingAutoInitEnabled to false in your application's Info.plist.
|
366
|
+
*/
|
367
|
+
@property(nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled;
|
368
|
+
|
369
|
+
/**
|
370
|
+
* The FCM token is used to identify this device so that FCM can send notifications to it.
|
371
|
+
* It is associated with your APNS token when the APNS token is supplied, so that sending
|
372
|
+
* messages to the FCM token will be delivered over APNS.
|
373
|
+
*
|
374
|
+
* The FCM token is sometimes refreshed automatically. In your FIRMessaging delegate, the
|
375
|
+
* delegate method `messaging:didReceiveRegistrationToken:` will be called once a token is
|
376
|
+
* available, or has been refreshed. Typically it should be called once per app start, but
|
377
|
+
* may be called more often, if token is invalidated or updated.
|
378
|
+
*
|
379
|
+
* Once you have an FCM token, you should send it to your application server, so it can use
|
380
|
+
* the FCM token to send notifications to your device.
|
381
|
+
*/
|
382
|
+
@property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken);
|
383
|
+
|
384
|
+
|
385
|
+
/**
|
386
|
+
* Retrieves an FCM registration token for a particular Sender ID. This can be used to allow
|
387
|
+
* multiple senders to send notifications to the same device. By providing a different Sender
|
388
|
+
* ID than your default when fetching a token, you can create a new FCM token which you can
|
389
|
+
* give to a different sender. Both tokens will deliver notifications to your device, and you
|
390
|
+
* can revoke a token when you need to.
|
391
|
+
*
|
392
|
+
* This registration token is not cached by FIRMessaging. FIRMessaging should have an APNS
|
393
|
+
* token set before calling this to ensure that notifications can be delivered via APNS using
|
394
|
+
* this FCM token. You may re-retrieve the FCM token once you have the APNS token set, to
|
395
|
+
* associate it with the FCM token. The default FCM token is automatically associated with
|
396
|
+
* the APNS token, if the APNS token data is available.
|
397
|
+
*
|
398
|
+
* @param senderID The Sender ID for a particular Firebase project.
|
399
|
+
* @param completion The completion handler to handle the token request.
|
400
|
+
*/
|
401
|
+
- (void)retrieveFCMTokenForSenderID:(nonnull NSString *)senderID
|
402
|
+
completion:(nonnull FIRMessagingFCMTokenFetchCompletion)completion
|
403
|
+
NS_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
|
404
|
+
|
405
|
+
|
406
|
+
/**
|
407
|
+
* Invalidates an FCM token for a particular Sender ID. That Sender ID cannot no longer send
|
408
|
+
* notifications to that FCM token.
|
409
|
+
*
|
410
|
+
* @param senderID The senderID for a particular Firebase project.
|
411
|
+
* @param completion The completion handler to handle the token deletion.
|
412
|
+
*/
|
413
|
+
- (void)deleteFCMTokenForSenderID:(nonnull NSString *)senderID
|
414
|
+
completion:(nonnull FIRMessagingDeleteFCMTokenCompletion)completion
|
415
|
+
NS_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
|
416
|
+
|
417
|
+
|
418
|
+
#pragma mark - Connect
|
419
|
+
|
420
|
+
/**
|
421
|
+
* Create a FIRMessaging data connection which will be used to send the data notifications
|
422
|
+
* sent by your server. It will also be used to send ACKS and other messages based
|
423
|
+
* on the FIRMessaging ACKS and other messages based on the FIRMessaging protocol.
|
424
|
+
*
|
425
|
+
*
|
426
|
+
* @param handler The handler to be invoked once the connection is established.
|
427
|
+
* If the connection fails we invoke the handler with an
|
428
|
+
* appropriate error code letting you know why it failed. At
|
429
|
+
* the same time, FIRMessaging performs exponential backoff to retry
|
430
|
+
* establishing a connection and invoke the handler when successful.
|
431
|
+
*/
|
432
|
+
- (void)connectWithCompletion:(nonnull FIRMessagingConnectCompletion)handler
|
433
|
+
NS_SWIFT_NAME(connect(handler:))
|
434
|
+
__deprecated_msg("Please use the shouldEstablishDirectChannel property instead.");
|
435
|
+
|
436
|
+
/**
|
437
|
+
* Disconnect the current FIRMessaging data connection. This stops any attempts to
|
438
|
+
* connect to FIRMessaging. Calling this on an already disconnected client is a no-op.
|
439
|
+
*
|
440
|
+
* Call this before `teardown` when your app is going to the background.
|
441
|
+
* Since the FIRMessaging connection won't be allowed to live when in the background, it is
|
442
|
+
* prudent to close the connection.
|
443
|
+
*/
|
444
|
+
- (void)disconnect
|
445
|
+
__deprecated_msg("Please use the shouldEstablishDirectChannel property instead.");
|
446
|
+
|
447
|
+
#pragma mark - Topics
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Asynchronously subscribes to a topic.
|
451
|
+
*
|
452
|
+
* @param topic The name of the topic, for example, @"sports".
|
453
|
+
*/
|
454
|
+
- (void)subscribeToTopic:(nonnull NSString *)topic NS_SWIFT_NAME(subscribe(toTopic:));
|
455
|
+
|
456
|
+
/**
|
457
|
+
* Asynchronously unsubscribe from a topic.
|
458
|
+
*
|
459
|
+
* @param topic The name of the topic, for example @"sports".
|
460
|
+
*/
|
461
|
+
- (void)unsubscribeFromTopic:(nonnull NSString *)topic NS_SWIFT_NAME(unsubscribe(fromTopic:));
|
462
|
+
|
463
|
+
#pragma mark - Upstream
|
464
|
+
|
465
|
+
/**
|
466
|
+
* Sends an upstream ("device to cloud") message.
|
467
|
+
*
|
468
|
+
* The message is queued if we don't have an active connection.
|
469
|
+
* You can only use the upstream feature if your FCM implementation
|
470
|
+
* uses the XMPP server protocol.
|
471
|
+
*
|
472
|
+
* @param message Key/Value pairs to be sent. Values must be String, any
|
473
|
+
* other type will be ignored.
|
474
|
+
* @param receiver A string identifying the receiver of the message. For FCM
|
475
|
+
* project IDs the value is `SENDER_ID@gcm.googleapis.com`.
|
476
|
+
* @param messageID The ID of the message. This is generated by the application. It
|
477
|
+
* must be unique for each message generated by this application.
|
478
|
+
* It allows error callbacks and debugging, to uniquely identify
|
479
|
+
* each message.
|
480
|
+
* @param ttl The time to live for the message. In case we aren't able to
|
481
|
+
* send the message before the TTL expires we will send you a
|
482
|
+
* callback. If 0, we'll attempt to send immediately and return
|
483
|
+
* an error if we're not connected. Otherwise, the message will
|
484
|
+
* be queued. As for server-side messages, we don't return an error
|
485
|
+
* if the message has been dropped because of TTL; this can happen
|
486
|
+
* on the server side, and it would require extra communication.
|
487
|
+
*/
|
488
|
+
- (void)sendMessage:(nonnull NSDictionary *)message
|
489
|
+
to:(nonnull NSString *)receiver
|
490
|
+
withMessageID:(nonnull NSString *)messageID
|
491
|
+
timeToLive:(int64_t)ttl;
|
492
|
+
|
493
|
+
#pragma mark - Analytics
|
494
|
+
|
495
|
+
/**
|
496
|
+
* Use this to track message delivery and analytics for messages, typically
|
497
|
+
* when you receive a notification in `application:didReceiveRemoteNotification:`.
|
498
|
+
* However, you only need to call this if you set the `FirebaseAppDelegateProxyEnabled`
|
499
|
+
* flag to `NO` in your Info.plist. If `FirebaseAppDelegateProxyEnabled` is either missing
|
500
|
+
* or set to `YES` in your Info.plist, the library will call this automatically.
|
501
|
+
*
|
502
|
+
* @param message The downstream message received by the application.
|
503
|
+
*
|
504
|
+
* @return Information about the downstream message.
|
505
|
+
*/
|
506
|
+
- (nonnull FIRMessagingMessageInfo *)appDidReceiveMessage:(nonnull NSDictionary *)message;
|
507
|
+
|
508
|
+
@end
|