Skip to content
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

Add a boolean value on whether to use direct channel callback for all ios versions #1875

Merged
merged 7 commits into from Sep 26, 2018

Conversation

@chliangGoogle
Copy link
Contributor

@chliangGoogle chliangGoogle commented Sep 25, 2018

Add a new boolean value that control whether to use direct channel callback for all iOS versions. This partially resolves the issue #1409.

We are separating the callback between apns and direct channel. Right now for iOS 10 and above, direct channel message delivered at FIRMessagingDelegate, while for iOS 9 and below, they were delivered at UIApplicationDelegate. To not break existing behavior, if user likes to receive direct channel callback using FIRMessagingDelegate instead of UIApplicationDelegate for all ios versions, they can now set the boolean value useMessagingDelegateForDirectChannel to true.

@chliangGoogle chliangGoogle requested review from morganchen12, paulb777 and ryanwilson and removed request for morganchen12 Sep 25, 2018
@paulb777
Copy link
Member

@paulb777 paulb777 commented Sep 25, 2018

Please fix travis issue:

$ ./scripts/check_whitespace.sh
Firebase/Messaging/Public/FIRMessaging.h:434:#pragma mark - FCM Direct Channel 
ERROR: Trailing whitespace found in the files above. Please fix.

Copy link
Member

@paulb777 paulb777 left a comment

Can the new flag be both set via an API and an Info.plist setting?


#import <OCMock/OCMock.h>

#ifdef COCOAPODS
Copy link
Member

@paulb777 paulb777 Sep 25, 2018

Remove ifdef. It should be created by copybara

Firebase/Messaging/FIRMessagingReceiver.m Show resolved Hide resolved
@chliangGoogle chliangGoogle added this to the M35 milestone Sep 25, 2018
Example/Messaging/Tests/FIRMessagingReceiverTest.m Outdated Show resolved Hide resolved
Firebase/Messaging/FIRMessagingReceiver.m Outdated Show resolved Hide resolved
@paulb777
Copy link
Member

@paulb777 paulb777 commented Sep 25, 2018

One more change needed. I noticed 'GoogleUtilities/Environment' is missing from the podspec dependencies in https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseMessaging.podspec. It's working because of transitive dependencies, but it should be added to make the dependency explicit.

Copy link
Member

@paulb777 paulb777 left a comment

LGTM on travis green.

@paulb777 paulb777 requested review from morganchen12 and removed request for ryanwilson Sep 26, 2018
Copy link
Contributor

@morganchen12 morganchen12 left a comment

LGTM with one optional nit.

Example/Messaging/Tests/FIRMessagingReceiverTest.m Outdated Show resolved Hide resolved
@chliangGoogle chliangGoogle merged commit 4736e05 into master Sep 26, 2018
2 checks passed
@chliangGoogle chliangGoogle deleted the fcm-delegate branch Sep 26, 2018
@firebase firebase locked and limited conversation to collaborators Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants