Closed Mukuljangir372 closed 8 months ago
@Mukuljangir372 Thanks for this Issue. Can you please provide a minimal reproducible sample project on GitHub?
@dima-avdeev-jb Thank you for your reply!
Here, Application root UiViewController
got replaced by UiImagePickerController UiViewController
that is returned by LocalUiViewController
resulting causing the iOS app restart as previous UIViewController
was replaced by UIImagePickerController
. So to fix this issue, We need to add UiViewController
on top of UiViewController
so that previous view don't get replaced by new one. To achieve this behaviour, we need to add this.
imagePickerController.modalPresentationStyle = .overCurrentContext //add this
rootController.present(imagePickerController, animated: true, completion: nil)
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug We're using
UIImagePickerController
to open the native camera usingUiViewController
in compose multiplatform. It is causing the iOS Application to get restart when click on cancel or capture in camera screen in iOS device.What is the issue
UIImagePickerController
causing the iOS app restart.Affected platforms
Versions
To Reproduce
Expected behavior iOS App should not restart automatically.
Code Snippets: