I am making existing UIKit application to SwiftUI. I have changed most of the screens to SwiftUI. But there are few screens that are still in UiKit, which I am still using in the app.
Earlier there was particular functionality added when app goes to background. Now that particular functionality is not working now in migration to SwiftUI.
Now what is happening is when app goes to background, viewWillDisappear is getting called and while coming to foreground viewWillAppear is getting called. Earlier in UiKit flow this was not happening.
Because of this particular functionality is not working properly.
Has anyone faced this type of issue, that view controller is getting destroyed when app goes to background and recreating again when app comes to foreground.
I know in SwiftUI lifecycle management, it destroys the view when app goes to background and recreate it when app comes to foreground. But I don't want this for few screens which are still in UiKit.