With Gleap, in-app notifications appear directly within the app when a new message is sent to a customer who has the app open. The same applies to news updates.
We also support push notification. Please see the push notifications documentation for more information on it.
Disable in-app notifications
The following method allows you to disable the in app notifications.
Gleap.setDisableInAppNotifications(true);Notification container offset
You can adjust the position of the in-app notification container by setting an offset in pixels:
[Gleap setNotificationContainerOffsetX: x y: y];x – Horizontal offset in pixels (positive values move the container to the right).
y – Vertical offset in pixels (positive values move the container down).
Inline banners
Inline banners (the banner style you pick in the Gleap dashboard) are shown at the top of the screen and cover the status bar. Floating banners float above the app as a card. By default both overlay your app. To keep your content below inline banners (SDK 19.3.0 or later), implement bannerHeightChanged: in your GleapDelegate. It reports the height in points from the top of the window, status bar included: when an inline banner is shown, resized or rotated, and 0 when it closes. Floating banners report 0. Gleap.bannerHeight returns the current value.
func bannerHeightChanged(_ height: CGFloat) {
// The banner covers the status bar: only the part below the safe area needs extra space.
contentTopConstraint.constant = max(height - view.safeAreaInsets.top, 0)
UIView.animate(withDuration: 0.25) { self.view.layoutIfNeeded() }
}- (void)bannerHeightChanged:(CGFloat)height {
self.contentTopConstraint.constant = MAX(height - self.view.safeAreaInsets.top, 0);
}
