aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Messaging/FIRMessagingPubSub.m
diff options
context:
space:
mode:
authorGravatar Oleksiy Ivanov <oleksiyi@google.com>2018-01-30 16:33:12 -0800
committerGravatar Oleksiy Ivanov <oleksiyi@google.com>2018-01-30 16:33:12 -0800
commit799a808de6ae2f2af4b4b331a841d7b001abacea (patch)
treebf608f8fecf4d77dfe824c84cceae19c13ca0af8 /Firebase/Messaging/FIRMessagingPubSub.m
parent3cbdbf2652202a3473271ed298ff50e5797cce68 (diff)
[FCM] Add completion handler to subscribe/unsubscribe topic actions
Added functionality not exposed in public header yet. I would leave to next FCM SDK owner to expose this functionality (and follow any required review process). Bugs: 72701086
Diffstat (limited to 'Firebase/Messaging/FIRMessagingPubSub.m')
-rw-r--r--Firebase/Messaging/FIRMessagingPubSub.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/Firebase/Messaging/FIRMessagingPubSub.m b/Firebase/Messaging/FIRMessagingPubSub.m
index c8293e0..74a5292 100644
--- a/Firebase/Messaging/FIRMessagingPubSub.m
+++ b/Firebase/Messaging/FIRMessagingPubSub.m
@@ -146,16 +146,18 @@ static NSString *const kPendingSubscriptionsListKey =
}];
}
-- (void)subscribeToTopic:(NSString *)topic {
+- (void)subscribeToTopic:(NSString *)topic
+ handler:(nullable FIRMessagingTopicOperationCompletion)handler {
[self.pendingTopicUpdates addOperationForTopic:topic
withAction:FIRMessagingTopicActionSubscribe
- completion:nil];
+ completion:handler];
}
-- (void)unsubscribeFromTopic:(NSString *)topic {
+- (void)unsubscribeFromTopic:(NSString *)topic
+ handler:(nullable FIRMessagingTopicOperationCompletion)handler {
[self.pendingTopicUpdates addOperationForTopic:topic
withAction:FIRMessagingTopicActionUnsubscribe
- completion:nil];
+ completion:handler];
}
- (void)scheduleSync:(BOOL)immediately {