Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 255
mohit Avatar asked Sep 12 '19 05:09

mohit


1 Answers

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.

like image 198
rmaddy Avatar answered Nov 15 '22 11:11

rmaddy