Closed neriusv closed 7 months ago
18.0.1
Xcode 15.3
View controller of a banner in-app message is not removed from parent view controller after being dismissed.
View controller should be removed after dismissing the banner message.
children
AirshipAutomation.InAppMessageBannerViewController
I believe the problem is at line 146 of AirshipLayoutDisplayAdapter.swift where viewController?.removeFromParent() is not called. The correct order should be
viewController?.removeFromParent()
viewController?.willMove(toParent: nil) viewController?.view.removeFromSuperview() viewController?.removeFromParent() viewController = nil
See Apple Developer documentation: [Remove a child view controller from your content](viewController?.removeFromParent())
n/a
Thanks for the report - will get this fixed and released in the next patch.
Preliminary Info
What Airship dependencies are you using?
18.0.1
What are the versions of any relevant development tools you are using?
Xcode 15.3
Report
What unexpected behavior are you seeing?
View controller of a banner in-app message is not removed from parent view controller after being dismissed.
What is the expected behavior?
View controller should be removed after dismissing the banner message.
What are the steps to reproduce the unexpected behavior?
children
of the root view controller:AirshipAutomation.InAppMessageBannerViewController
is still present.I believe the problem is at line 146 of AirshipLayoutDisplayAdapter.swift where
viewController?.removeFromParent()
is not called. The correct order should beSee Apple Developer documentation: [Remove a child view controller from your content](viewController?.removeFromParent())
Do you have logging for the issue?
n/a