Describe the bug
The composition is completely destroyed and recreated when the view controller goes through viewDidDisappear / viewWillAppear.
Affected platforms
iOS
Versions
Kotlin version*: 1.9.0
Compose Multiplatform version*: 1.5.1
OS version(s)* (required for Desktop and iOS issues): iOS 16.4
OS architecture (x86 or arm64): x86
To Reproduce
The code snippet is here.
It's a simple screen with a button that calls Stripe payment sheet. I cannot share details about Stripe configuration and payment options.
Steps to reproduce the behavior:
Press the button.
Stripe payment sheet will be shown.
See that the composition is disposed and gone.
Close the payment sheet.
See that the composition is created and shown again.
Expected behavior
The composition is not disposed.
Additional context
The problem appeared after migrating from version 1.4.3 to version 1.5.1.
Looks like the breaking change was introduced in this commit.
And Stripe indirectly calls viewDidDisappear after the bottom sheet animation is complete here.
Describe the bug The composition is completely destroyed and recreated when the view controller goes through
viewDidDisappear
/viewWillAppear
.Affected platforms
Versions
To Reproduce The code snippet is here. It's a simple screen with a button that calls Stripe payment sheet. I cannot share details about Stripe configuration and payment options. Steps to reproduce the behavior:
Expected behavior The composition is not disposed.
Video
https://github.com/JetBrains/compose-multiplatform/assets/61359788/0e74d718-cbf6-4bdd-b49c-ef1c0221e58f
Additional context The problem appeared after migrating from version 1.4.3 to version 1.5.1. Looks like the breaking change was introduced in this commit. And Stripe indirectly calls
viewDidDisappear
after the bottom sheet animation is complete here.