AppLovin / AppLovin-MAX-SDK-iOS

84 stars 69 forks source link

Banner position changes independently on devices with notch or dynamic island #308

Closed GHvolkovvadim94 closed 1 month ago

GHvolkovvadim94 commented 1 month ago

MAX SDK Version

12.3.1

Device/Platform Info

iOS devices with notch or dynamic island (>iPhone X...)

Current Behavior

There is no problem on iPhones lower than iphone X, or Android devices The problem relates to the banners located in the upper left corner. Some banners change their position after clicking on them. They bounce about the height of another banner down.Sometimes the banner can return to its original position on its own. image

Expected Behavior

The banner should not change its position when opening a placement.

How to Reproduce

The banner should be in the upper left corner.

  1. Display the banner in the application
  2. Click on it.
  3. In some cases, the banner bounces down

Additional Info

No response

thomasmso commented 1 month ago

@GHvolkovvadim94 - I assume you are using our Unity Plugin? If so, we will be releasing a new plugin over the weekend, which would hopefully fix the issue.

GHvolkovvadim94 commented 1 month ago

@thomasmso Yes, that's right. I will be glad to test it and leave feedback.

GHvolkovvadim94 commented 1 month ago

@thomasmso Greetings! Do you have any updates on this problem?

santoshbagadi commented 1 month ago

@GHvolkovvadim94 we'll include the fix in the upcoming release. In the mean time you can apply the fix by updating this line: UILayoutGuide *layoutGuide = superview.safeAreaLayoutGuide; in Assets/MaxSdk/AppLovin/Plugins/iOS/MAUnityAdManager.m file to

UILayoutGuide *layoutGuide = KEY_WINDOW.safeAreaLayoutGuide;
GHvolkovvadim94 commented 1 month ago

@santoshbagadi Hi. This fix returns the banner to the correct position if it has been changed. The position is returned after the banner content is closed and this transition is still noticeable. That is, it is noticeable how he jumps. It's much better than it was, but it still seems like an unfinished solution.

Video: https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/assets/133892827/1078eda3-f522-44bb-ae48-72c9ab9f20a2

santoshbagadi commented 1 month ago

@GHvolkovvadim94 unfortunately the main issue is with how Unity player view controller and how it presents other view controllers: https://forum.unity.com/threads/unity-safearea-is-inconsistent-between-different-starting-rotations.1173764/

So, we won't really be able to fully fix the banner jumping, since the underlying safe area itself is changing.