Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
167 stars 140 forks source link

Add height value for iPhone 12 mini in ABKUIUtils #266

Closed Mildwhale closed 3 years ago

Mildwhale commented 3 years ago

Hi, I have an issue when using ABKInAppMessageFullViewController on iPhone 12 mini. In the screenshot, the close button is hidden in the status bar.

Screen Shot 2020-12-18 at 10 38 03 AM

So I debugged your SDK and found some issue about incorrect height in ABKUIUtils. I added code to the ABKUIUtils, to return the correct value in isNotchedPhone method when using iPhone 12 mini.

Bucimis commented 3 years ago

Hi @Mildwhale, does this occur on simulator or on the physical device, or both?

Mildwhale commented 3 years ago

Hi @Mildwhale, does this occur on simulator or on the physical device, or both?

Occurred only physical device.

Physical device (iPhone 12 Mini, iOS 14.2.1)

(lldb) po UIScreen.mainScreen.nativeBounds
(origin = (x = 0, y = 0), size = (width = 1080, height = 2340))

Simulator (iPhone 12 Mini, iOS 14.3)

(lldb) po UIScreen.mainScreen.nativeBounds
(origin = (x = 0, y = 0), size = (width = 1125, height = 2436))
Bucimis commented 3 years ago

@Mildwhale thanks so much. We'll take a look on our end as well

Mildwhale commented 3 years ago

Ok, this issue solved in 3.31.2. Thanks 👍