Skip to content

add firebase in-app messaging display pod #1798

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 7 commits into from
Sep 14, 2018

Conversation

mylyuic
Copy link
Contributor

@mylyuic mylyuic commented Sep 10, 2018

This is the firebase in-app messaging display pod, which is the default display implementation for fiam. It requires firebase in-app messaging of version 0.12.0 or higher.

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.

Update this README section and create a README - https://github.com/firebase/firebase-ios-sdk#development

FirebaseInAppMessagingDisplay is the default UI implementation from Firebase for
rendering In-App Messaging messges to end users.

Apps can also provide custom UI implementation to replace it. Check out our guides
Copy link
Member

Choose a reason for hiding this comment

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

Add link to guides - then lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's still being developed. Will add it once the doc is released.

Copy link
Member

Choose a reason for hiding this comment

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

sgtm

@paulb777
Copy link
Member

Please wait for @ryanwilson to review before merging.

Copy link
Member

@ryanwilson ryanwilson left a comment

Choose a reason for hiding this comment

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

Some minor things before submitting

[self.view addGestureRecognizer:tapGestureRecognizer];
}

static const CGFloat kSwipeUpThreshold = -10.0f;
Copy link
Member

Choose a reason for hiding this comment

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

This should likely be at the top, not inline with method implementations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved

if (self.displayDelegate) {
[self.displayDelegate messageClicked];
} else {
FIRLogWarning(kFIRLoggerInAppMessagingDisplay, @"I-FID200008", @"Display delegate is nil");
Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate a little bit more in this warning? "Firebase In App Message was tapped but the display delegate is nil - add a delegate in order to respond to actions." or something so users know what to do without having to look it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the text.

@interface FIDRenderingWindowHelper : NSObject

// Return the singleton UIWindow that can be used for rendering modal IAM views
+ (UIWindow *)uiWindowForModalView;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: style guide-wise these should start with UI not ui. Although I think just windowForModalView seems like a better name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to UIWindow

// Firebase InAppMessagingDisplay is merged into master. Keep them separate now to help
// with build from development folder and avoid merge conflicts.

// this should eventually be in FIRLogger.h
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I think we want to eventually get constants out of FIRLogger, right @paulb777? If that's the case, please remove these comments.

Copy link
Member

Choose a reason for hiding this comment

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

Right, we want to move the service constants to the clients

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the comment


// Banner view will be rendered and dismissed with animation. Within viewDidLayoutSubviews function,
// we would position the view so that it's out of UIWindow range on the top so that later on it can
// be slided in with animation. However, viewDidLayoutSubviews is also triggred in other scenarios
Copy link
Member

Choose a reason for hiding this comment

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

so that later on it can slide in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

if (resourceBundle == nil) {
NSError *error = [NSError errorWithDomain:kFirebaseInAppMessagingDisplayErrorDomain
code:FIAMDisplayRenderErrorTypeUnspecifiedError
userInfo:@{@"message" : @"resource bundle is missing"}];
Copy link
Member

Choose a reason for hiding this comment

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

Does this get presented to the user? Or just the developer?

@mylyuic mylyuic merged commit c7e9b2d into master Sep 14, 2018
renkelvin added a commit that referenced this pull request Sep 14, 2018
@paulb777 paulb777 deleted the mylyuic/add-fiam-display-component branch May 26, 2019 20:48
@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
Development

Successfully merging this pull request may close these issues.

4 participants