Questions tagged [uiscene]

For questions about the scene/window management APIs introduced in UIKit in iOS 13.

31 questions
2
votes
1 answer

iOS - Is there a programmatically way to create multiple windows that don't split the screen?

I'm using UIScenes and SwiftUI to create a simple app. I need to create multiple windows programmatically, but not with the same design outcome from requestSceneSessionActivation, that splits the screen into 2 pieces. I need the other one, like the…
Carla Camargo
  • 574
  • 5
  • 14
2
votes
0 answers

How do you get a reference to your Scene Delegate (UIWindowSceneDelegate) as you would with your AppDelegate (UIApplicationDelegate)?

Prior to iOS 13, when AppDelegate was king, you could do (well you still can) UIApplication.shared.delegate to get a reference to your AppDelegate. But how do you get a reference to your UIWindowSceneDelegate that manages a single window scene in…
christianselig
  • 405
  • 4
  • 17
2
votes
1 answer

iOS 13 app requests a new scene each time the app icon is tapped

I'm setting up my app with multiple windows. It's working well. But when I open my app from the springboard, it creates a new window every time. I'm on the latest Xcode & iPadOS 13.0 betas. All my viewcontrollers, views, etc, are made…
Jason Pierna
  • 331
  • 1
  • 3
  • 10
1
vote
1 answer

Detecting if Stage Manager is Available in SwiftUI

Is there anyway to detect if Stage Manager is available on an iPad from a swiftUI application. Thanks
reza23
  • 3,079
  • 2
  • 27
  • 42
1
vote
1 answer

UIWindow in SceneDelegate

Recently, I encountered a problem, which I have posted here, in stackoverflow. Apparently, the error was because a random UIWindow variable was used to display UI (and not the one in SceneDelegate). Here's my understanding - Every time a scene is…
NightFuryLxD
  • 847
  • 5
  • 15
1
vote
0 answers

How can I get the last window using UIWindowScene.windows in iOS 15?

Going off this post which describes how to get the first window - has definitely helped me learned more about this spec, but it wasn't able to get me the solution I need. How to resolve: 'keyWindow' was deprecated in iOS…
user15688965
1
vote
1 answer

Status bar height in SwiftUI in iOS 13

How do you get the current scene's status bar height for use in a SwiftUI view? It looks like the key is accessing the current scene. From a view controller, you can use view.window?.windowScene to get to the scene, but what about in a SwiftUI view?
Edward Brey
  • 40,302
  • 20
  • 199
  • 253
1
vote
1 answer

UIScene userActivity is nil

I have a (Catalyst) app, that is able to have several windows. I created a button and if the user presses this button, the app creates a new window. To know, what View needs to be shown, I have different NSUserActivity activityTypes. In the new…
Lupurus
  • 3,618
  • 2
  • 29
  • 59
1
vote
0 answers

NSUserActivity for a newly requested scene has no user info

In my app I have a table view where each cell represents a file URL. The user can tap a cell and a new UIScene will open representing that file... // In some view controller override func tableView(_ tableView: UITableView, didSelectRowAt indexPath:…
DanubePM
  • 1,526
  • 1
  • 10
  • 24
1
vote
1 answer

Top most view controller with multiple window scenes in iOS13

I'm conforming my application to use multiple windows on iPadOS with iOS 13, as far as I know I cannot access to UIApplication window directly due to it's deprecation, how can I get the top most view controller? Until iOS12 I use this working…
Fabiosoft
  • 1,141
  • 14
  • 32
1
vote
1 answer

How to check if the current iOS device supports multiple scenes/windows?

I'm adding an "Open in New Window" context menu item which opens one of my app's documents in a new UIScene. Of course, I only want to show that menu item on devices which actually support multiple scenes. Currently I'm just checking if the device…
Jon Colverson
  • 2,986
  • 1
  • 24
  • 24
0
votes
1 answer

What exactly does Apple documentation mean by "scene support"?

https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle Scene support is an opt-in feature Apps must explicitly opt in to scenes, which you do by updating your app’s configuration settings. In iOS 12…
trndjc
  • 11,654
  • 3
  • 38
  • 51
0
votes
1 answer

[Carplay]: Crash of the main app at viewcontroller presentation while having the carplay app opened at the same time

I just implemented our new Carplay feature @Qobuz but I'm having a weird crash that I can't find an answer at. Scenario: Having the carplay app opened and using the application on the phone at the same time, if I ever open a viewcontroller that is…
tYp
  • 121
  • 9
0
votes
1 answer

Manually saving scene NSUserActivity on iOS/iPadOS 13

I have implemented iOS/iPadOS 13 state restoration using NSUserActivity, mainly because my app supports multiple scenes. The problem is that when I'm running the Simulator with two side-by-side scenes and force restart the app by rebuilding the…
Rivera
  • 10,792
  • 3
  • 58
  • 102
0
votes
2 answers

macOS Catalyst configurationForConnecting UISceneSession delegate function not always called on app launch

I'm building a macOS Catalyst app with support for multiple windows, which is implemented with the new UISceneDelegate set of APIs introduced in iOS 13. According to Apple's documentation, as a new window is created, a scene delegate needs to…
Max Desiatov
  • 5,087
  • 3
  • 48
  • 56