OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
496 stars 263 forks source link

Update IAM view controller to hide status bar on full-bleed In-App Messages #1390

Closed jennantilla closed 7 months ago

jennantilla commented 8 months ago

Description

One Line Summary

Update OSInAppMessageViewController to hide status bar on full screen, no margin (AKA full-bleed) In-App Messages.

Details

Motivation

When an In-App Message displays, the iOS Status Bar appears even if hidden in the app. This fix assess whether the In-App Message is full screen without margins and if so, sets the property prefersStatusBarHidden to true so that the status bar will not display. Note that for banner, center modal, and full screen with margin In-App Messages, the status bar will remain visible.

Scope

This change affects only the OSInAppMessageViewController.

Testing

Manual testing

Tested a series on In-App Messages where the status bar appears on a center modal IAM, full screen IAM, and banner IAM, then is removed for a full-bleed IAM:

Testing was done on an iPhone 15 Emulator running iOS 17.2.

Affected code checklist

Checklist

Overview

Testing

Final pass


This change is Reviewable

jennantilla commented 7 months ago

PR has been updated to only remove status bar on full screen IAM. cc @emawby

nan-li commented 7 months ago

General question for all reviewers: Should we distinguish between full-screen w/margin vs. full-bleed IAMs without margin? Keep the status bar for the first one below?

jennantilla commented 7 months ago

Updated to only hide status bar for full-bleed IAMs.