@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
25
25
* The scope to be used when fetching/deleting a token for Firebase Messaging.
26
26
*/
27
27
FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
28
- NS_SWIFT_NAME (InstanceIDScopeFirebaseMessaging);
28
+ NS_SWIFT_NAME (InstanceIDScopeFirebaseMessaging) DEPRECATED_ATTRIBUTE ;
29
29
30
30
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
31
31
/* *
@@ -37,7 +37,7 @@ FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
37
37
* to control the rate of token updates on application servers.
38
38
*/
39
39
FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotification
40
- NS_SWIFT_NAME (InstanceIDTokenRefresh);
40
+ NS_SWIFT_NAME (InstanceIDTokenRefresh) DEPRECATED_ATTRIBUTE ;
41
41
#else
42
42
/* *
43
43
* Called when the system determines that tokens need to be refreshed.
@@ -48,7 +48,7 @@ FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotificatio
48
48
* to control the rate of token updates on application servers.
49
49
*/
50
50
FOUNDATION_EXPORT NSString *const kFIRInstanceIDTokenRefreshNotification
51
- NS_SWIFT_NAME (InstanceIDTokenRefreshNotification);
51
+ NS_SWIFT_NAME (InstanceIDTokenRefreshNotification) DEPRECATED_ATTRIBUTE ;
52
52
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
53
53
54
54
/* *
@@ -150,7 +150,10 @@ typedef NS_ENUM(NSUInteger, FIRInstanceIDError) {
150
150
* A class contains the results of InstanceID and token query.
151
151
*/
152
152
NS_SWIFT_NAME (InstanceIDResult)
153
- @interface FIRInstanceIDResult : NSObject <NSCopying>
153
+ __deprecated_msg(" FIRInstanceIDResult is deprecated, please use FIRInstallations "
154
+ " for app instance identifier handling and use FIRMessaging for "
155
+ " FCM registration token handling." ) @interface FIRInstanceIDResult
156
+ : NSObject<NSCopying>
154
157
155
158
/* *
156
159
* An instanceID uniquely identifies the app instance.
@@ -184,7 +187,9 @@ NS_SWIFT_NAME(InstanceIDResult)
184
187
* `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
185
188
*/
186
189
NS_SWIFT_NAME (InstanceID)
187
- @interface FIRInstanceID : NSObject
190
+ __deprecated_msg(" FIRInstanceID is deprecated, please use FIRInstallations for installation "
191
+ " identifier handling and use FIRMessaging for FCM registration token handling." )
192
+ @interface FIRInstanceID : NSObject
188
193
189
194
/* *
190
195
* FIRInstanceID.
@@ -206,7 +211,10 @@ NS_SWIFT_NAME(InstanceID)
206
211
* are generated and returned. If instanceID and token fetching fail for some
207
212
* reason the callback is invoked with nil `result` and the appropriate error.
208
213
*/
209
- - (void )instanceIDWithHandler:(FIRInstanceIDResultHandler)handler;
214
+ - (void )instanceIDWithHandler:(FIRInstanceIDResultHandler)handler
215
+ __deprecated_msg (" Use `Installations.installationID(completion:)` to get the app instance "
216
+ " identifier instead. "
217
+ " Use `Messaging.token(completion:)` to get FCM registration token instead." );
210
218
211
219
/* *
212
220
* Returns a token that authorizes an Entity (example: cloud service) to perform
@@ -250,7 +258,8 @@ NS_SWIFT_NAME(InstanceID)
250
258
- (void )tokenWithAuthorizedEntity:(NSString *)authorizedEntity
251
259
scope:(NSString *)scope
252
260
options:(nullable NSDictionary *)options
253
- handler:(FIRInstanceIDTokenHandler)handler;
261
+ handler:(FIRInstanceIDTokenHandler)handler
262
+ __deprecated_msg (" Use Messaging.token(completion:) instead." );
254
263
255
264
/* *
256
265
* Revokes access to a scope (action) for an entity previously
@@ -273,7 +282,8 @@ NS_SWIFT_NAME(InstanceID)
273
282
*/
274
283
- (void )deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity
275
284
scope:(NSString *)scope
276
- handler:(FIRInstanceIDDeleteTokenHandler)handler;
285
+ handler:(FIRInstanceIDDeleteTokenHandler)handler
286
+ __deprecated_msg (" Use `Messaging.deleteToken(completion:)` instead." );
277
287
278
288
#pragma mark - Identity
279
289
@@ -291,7 +301,9 @@ NS_SWIFT_NAME(InstanceID)
291
301
* a valid identifier is returned and a valid identifier for the
292
302
* application instance.
293
303
*/
294
- - (void )getIDWithHandler:(FIRInstanceIDHandler)handler NS_SWIFT_NAME (getID(handler:));
304
+ - (void )getIDWithHandler:(FIRInstanceIDHandler)handler
305
+ NS_SWIFT_NAME (getID(handler:))
306
+ __deprecated_msg(" Use `Installations.installationID(completion:)` instead." );
295
307
296
308
/* *
297
309
* Resets Instance ID and revokes all tokens.
@@ -305,7 +317,10 @@ NS_SWIFT_NAME(InstanceID)
305
317
* (like FCM, RemoteConfig or Analytics) or user explicitly calls Instance ID APIs to get an
306
318
* Instance ID and token again.
307
319
*/
308
- - (void )deleteIDWithHandler:(FIRInstanceIDDeleteHandler)handler NS_SWIFT_NAME (deleteID(handler:));
320
+ - (void )deleteIDWithHandler:(FIRInstanceIDDeleteHandler)handler NS_SWIFT_NAME (deleteID(handler:))
321
+ __deprecated_msg(" Use `Installations.delete(completion:)` instead. "
322
+ " Also check `Messaging.deleteData(completion:)`"
323
+ " if you want to delete FCM registration token." );
309
324
310
325
@end
311
326
0 commit comments