aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Example/Messaging/Tests/FIRMessagingServiceTest.m6
-rw-r--r--Firebase/Messaging/FIRMessagingPubSub.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/Example/Messaging/Tests/FIRMessagingServiceTest.m b/Example/Messaging/Tests/FIRMessagingServiceTest.m
index 9afdced..073adad 100644
--- a/Example/Messaging/Tests/FIRMessagingServiceTest.m
+++ b/Example/Messaging/Tests/FIRMessagingServiceTest.m
@@ -146,12 +146,15 @@
XCTestExpectation *exceptionExpectation =
[self expectationWithDescription:@"Should throw exception for invalid token"];
@try {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
[messaging.pubsub subscribeWithToken:@"abcdef1234"
topic:nil
options:nil
handler:^(NSError *error) {
XCTFail(@"Should not invoke the handler");
}];
+#pragma clang diagnostic pop
}
@catch (NSException *exception) {
[exceptionExpectation fulfill];
@@ -169,12 +172,15 @@
XCTestExpectation *exceptionExpectation =
[self expectationWithDescription:@"Should throw exception for invalid token"];
@try {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
[messaging.pubsub unsubscribeWithToken:@"abcdef1234"
topic:nil
options:nil
handler:^(NSError *error) {
XCTFail(@"Should not invoke the handler");
}];
+#pragma clang diagnostic pop
}
@catch (NSException *exception) {
[exceptionExpectation fulfill];
diff --git a/Firebase/Messaging/FIRMessagingPubSub.h b/Firebase/Messaging/FIRMessagingPubSub.h
index b249866..1c615d1 100644
--- a/Firebase/Messaging/FIRMessagingPubSub.h
+++ b/Firebase/Messaging/FIRMessagingPubSub.h
@@ -70,7 +70,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)subscribeWithToken:(NSString *)token
topic:(NSString *)topic
- options:(NSDictionary *)options
+ options:(nullable NSDictionary *)options
handler:(FIRMessagingTopicOperationCompletion)handler;
/**
@@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)unsubscribeWithToken:(NSString *)token
topic:(NSString *)topic
- options:(NSDictionary *)options
+ options:(nullable NSDictionary *)options
handler:(FIRMessagingTopicOperationCompletion)handler;
/**