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

charlotteliang
Copy link
Contributor

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.

@charlotteliang charlotteliang requested review from morganchen12, paulb777 and ryanwilson and removed request for morganchen12 September 25, 2018 18:43
@paulb777
Copy link
Member

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

Choose a reason for hiding this comment

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

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


#import <OCMock/OCMock.h>

#ifdef COCOAPODS
Copy link
Member

Choose a reason for hiding this comment

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

Remove ifdef. It should be created by copybara

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

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

Choose a reason for hiding this comment

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

LGTM on travis green.

@paulb777 paulb777 requested review from morganchen12 and removed request for ryanwilson September 26, 2018 00:15
Copy link
Contributor

@morganchen12 morganchen12 left a comment

Choose a reason for hiding this comment

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

LGTM with one optional nit.

Example/Messaging/Tests/FIRMessagingReceiverTest.m Outdated Show resolved Hide resolved
@charlotteliang charlotteliang merged commit 4736e05 into master Sep 26, 2018
@charlotteliang charlotteliang deleted the fcm-delegate branch September 26, 2018 20:16
@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
4 participants