Skip to content

Commit b84e42d

Browse files
authored
Messaging - no typedefs in public APIs (#6278)
1 parent 85b7050 commit b84e42d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

FirebaseMessaging/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# unreleased
22
- [fixed] Fixed an issue that topic doesn't work in watchOS. (#6160)
3+
- [fixed] Improved Xcode completion of public API completion handlers in Swift. (#6278)
34

45
# 2020-07 -- v4.6.1
56
- [changed] Remove logic that is executed for iOS 7 and below. (#5835)

FirebaseMessaging/Sources/Public/FIRMessaging.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ NS_SWIFT_NAME(Messaging)
396396
* @param completion The completion handler to handle the token request.
397397
*/
398398
- (void)retrieveFCMTokenForSenderID:(NSString *)senderID
399-
completion:(FIRMessagingFCMTokenFetchCompletion)completion
399+
completion:(void (^)(NSString *_Nullable FCMToken,
400+
NSError *_Nullable error))completion
400401
NS_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
401402

402403
/**
@@ -407,7 +408,7 @@ NS_SWIFT_NAME(Messaging)
407408
* @param completion The completion handler to handle the token deletion.
408409
*/
409410
- (void)deleteFCMTokenForSenderID:(NSString *)senderID
410-
completion:(FIRMessagingDeleteFCMTokenCompletion)completion
411+
completion:(void (^)(NSError *_Nullable error))completion
411412
NS_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
412413

413414
#pragma mark - Topics
@@ -432,7 +433,7 @@ NS_SWIFT_NAME(Messaging)
432433
* appropriate error object is returned.
433434
*/
434435
- (void)subscribeToTopic:(nonnull NSString *)topic
435-
completion:(nullable FIRMessagingTopicOperationCompletion)completion;
436+
completion:(void (^_Nullable)(NSError *_Nullable error))completion;
436437

437438
/**
438439
* Asynchronously unsubscribe from a topic. This uses a FCM Token
@@ -454,7 +455,7 @@ NS_SWIFT_NAME(Messaging)
454455
* appropriate error object is returned.
455456
*/
456457
- (void)unsubscribeFromTopic:(nonnull NSString *)topic
457-
completion:(nullable FIRMessagingTopicOperationCompletion)completion;
458+
completion:(void (^_Nullable)(NSError *_Nullable error))completion;
458459

459460
#pragma mark - Upstream
460461

0 commit comments

Comments
 (0)