Skip to content

Options should be nullable for subscription #1085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 13, 2018
Merged

Options should be nullable for subscription #1085

merged 3 commits into from
Apr 13, 2018

Conversation

charlotteliang
Copy link
Contributor

Also ignore the nonnull warning when intentionally passing a nil parameter.

@@ -146,12 +146,15 @@ - (void)testSubscribeWithInvalidTopic {
XCTestExpectation *exceptionExpectation =
[self expectationWithDescription:@"Should throw exception for invalid token"];
@try {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnonnull"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: When testing, you can just cast nil pointers to nonnull types. (id _Nonnull)nil

@morganchen12
Copy link
Contributor

Travis failure indicates you need to change the nullability specifier in all declarations of the method:

❌  /Users/travis/build/firebase/firebase-ios-sdk/Firebase/Messaging/FIRMessagingPubSub.m:58:53: nullability specifier 'nullable' conflicts with existing specifier 'nonnull'
                   options:(nullable NSDictionary *)options
                                                    ^
❌  /Users/travis/build/firebase/firebase-ios-sdk/Firebase/Messaging/FIRMessagingPubSub.m:101:55: nullability specifier 'nullable' conflicts with existing specifier 'nonnull'
                     options:(nullable NSDictionary *)options
                                                      ^

@charlotteliang
Copy link
Contributor Author

Oops, right, I should change the header instead of the .m file.

@charlotteliang charlotteliang merged commit 609cd03 into master Apr 13, 2018
@charlotteliang charlotteliang deleted the lc-fcm branch April 13, 2018 18:15
minafarid pushed a commit to minafarid/firebase-ios-sdk that referenced this pull request Jun 6, 2018
Getting warning message from xcode so we need to define it to remove warning.
@firebase firebase locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants