How to launch multiple instances of a scene on iPhone with iOS 13?
Asked Answered
P

1

9

The apple developer docs mentions that multiple instances of a scene are available on iOS 13 (ie both iPhone and iPad)

From their developer docs:

In iOS 13 and later, the user can create and manage multiple instances of your app's user interface simultaneously, and switch between them using the app switcher. On iPad, the user can also display multiple instances of your app side by side. Each instance of your UI displays different content, or displays the same content in a different way. For example, the user can display one instance of the Calendar app showing a specific day, and another showing an entire month.

I have tried it on iPadOS and I am able to create multiple scene instances using the gesture and UI actions mentioned in their WWDC videos but I have not found any reference around how to achieve that on iPhone, it would be really helpful to know how to achieve this or whether it is possible or not.

Photon answered 12/9, 2019 at 5:2 Comment(0)
L
14

The documentation you quote is misleading due to the use of the term "iOS".

The ability to create multiple scenes for an app in iOS 13 is actually limited to iPads and iPadOS. You can't create more than the one app scene on an iPhone in iOS.

Use UIApplication.sharedApplication.supportsMultipleScenes (Objective-C) / UIApplication.shared.supportsMultipleScenes (Swift) to check if the current device supports multiple scenes. You will find that this return NO/false on iPhones and YES/true on iPads.

That check is useful to enable/disable the ability to use drag and drop that creates an NSUserActivity or UI components that lead to uses of UIApplication requestSceneSessionActivation.

Lucey answered 12/9, 2019 at 5:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.