Post

Replies

Boosts

Views

Activity

iPadOS 15, cannot replace/destroy foreground scene, and activate an existing background scene.
I have a document based app, and if the user tries to open a document in the active/foreground scene, and that document is already open in another existing scene, I would like to activate that existing scene, and destroy the current foreground one. I do it like that: UIApplication.shared.requestSceneSessionActivation(existingSession, userActivity: activity, options: nil) UIApplication.shared.requestSceneSessionDestruction(foregroundSession, options: nil) When I run this code, the foreground scene is destroyed, but the activated one is not brought to foreground, it simply takes me to home screen. On iOS14, it kinda works, the existing one is brought to foreground and splits the screen with the current foreground one for a split second, then the current one is destroyed, and the existing scene now takes all the screen. The intermediate split state is not visually nice but it does it's job. How can I achieve the same behaviour on iOS15?
1
0
835
Sep ’21