Questions tagged [uiscenedelegate]

Methods you use to respond to life-cycle events occurring within a scene.

UISceneDelegate is available in UIKit since iOS 13.

From https://developer.apple.com/documentation/uikit/uiscenedelegate?language=objc

Use your UISceneDelegate object to manage life-cycle events in one instance of your app's user interface. This interface defines methods for responding to state transitions that affect the scene, including when the scene enters the foreground and becomes active, and when it enters the background. Use your delegate to provide appropriate behavior when these transitions occur. For example, finish critical tasks and quiet your app when it enters the background.

Do not create UISceneDelegate objects directly. Instead, specify the name of your custom delegate class as part of the configuration data for your scenes. You can specify this information in your app's Info.plist file, or in the UISceneConfiguration object you return from your app delegate's application:configurationForConnectingSceneSession:options: method.

156 questions
1
vote
1 answer

Updating/Changing root view controller after initially opening app for iOS13+

I'm trying to update the root view controller from ViewController() to fourYearPlan(). When the user initially opens the app, they are greeted in ViewController() and led to a TableViewController(). From there, when they tap on a tableViewCell, it…
1
vote
0 answers

How to identify which UIScene was last interacted by user in iOS 13

I have a framework which based on user actions shows alert messages by adding webview on top of the current top view. Prior to iOS 13 and multiple scene support, I use to fetch the top view using following code UIViewController *topController =…
user1169079
  • 3,053
  • 5
  • 42
  • 71
1
vote
1 answer

Accessing UIWindow instance in Xcode 11.3 when target is ios 11.0 or letter

The problem is I'm using Xcode 11 which has the new AppDelegate / SceneDelegate setup. Because of this, the UIWindow is nil, so the new rootViewController is not set. I know that in iOS 13 the window is accessed in the SceneDelegate, but this…
Drashti Javiya
  • 519
  • 1
  • 3
  • 14
1
vote
4 answers

Update root view controller after user login + iOS 13 and later

Using scene delegate I'm able to set the root view controller.(I'm using Xcode 11.3 and iOS version 13.3 and running my app on iPhone 6+ with iOS 12.4) What I want is when user login, I need to update the root view controller. For that I did the…
Mahendra
  • 8,448
  • 3
  • 33
  • 56
1
vote
1 answer

Modal View Controller State Restoration SceneDelegate

I am trying to restore a modal Viewcontroller from within SceneDelegate. However this code doesn't allow the modal view controller to display and causes the following error: "Unbalanced calls to begin/end appearance transitions for...". func…
dgee4
  • 381
  • 3
  • 16
1
vote
3 answers

Black Screen in iOS 13 when change Storybord View Controller

In iOS 13 when i call to other StoryBoard, when charge the ViewController appear a black screen on my view. I use this code for call a new StoryBoard: UIStoryboard *homeSB = [UIStoryboard storyboardWithName:SBNameHome bundle:nil]; UIViewController…
1
vote
1 answer

Difference between "didBecomeActive" and "willResignActive" method pairs for UISceneDelegate and UIApplicationDelegate?

My main task is to overlap the screen with non-transparent view to hide info when app enters background. The official solution is described here. The problem is it sometimes doesn't work on iOS 13. I found this article: It explains how…
Vyachaslav Gerchicov
  • 2,317
  • 3
  • 23
  • 49
1
vote
1 answer

How can scene delegate be uses pre iOS 13?

So iOS 13 is really causing trouble for me! I cant get my head around how the SceneDelegate can be uses within my existing application. Currently I'm using a boolean check in my AppDelegate to determine which ViewController is presented first.. I…
user10460877
0
votes
0 answers

How do I fix the error on erased SceneDeleate related with UIKit?

At first, Xcode always been terminated with the error related with EnvironmentObject. To utilize EnvironmentObject on Xcode, I created SceneDelegate.swift since my project didn't contain it. Then it works, but another error occurs. enter image…
0
votes
1 answer

None of SceneDelegate methods (options connectionOptions & continue userActivity) are triggered when opening the app via Firebase Dynamic Link

I'm facing an issue with Firebase Dynamic Links in my iOS application. Whenever I open the app using a dynamic link, none of the functions in my AppDelegate or SceneDelegate seem to be called, except for the indication that the scene went to the…
eugene_prg
  • 948
  • 2
  • 12
  • 25
0
votes
0 answers

Keyboard showing weird behavior in WKWebView in Debug and Runtime configurations

I have a WKWebView in my iOS App. Let's say for simplicity, WKWebView is loading https://www.google.com/. Now when I run the app via Xcode into the simulator, the app loads and the WKWebView loads perfectly. When I press on the search input field of…
0
votes
0 answers

How to enable scene restoration in SceneDelegate? What does scene restoration do?

I'm looking to implement scene restoration and wanted to make sure that I have the right idea on how to approach this. Currently, my application supports multiple windows but every subsequent scene after the first doesn't have its UI set up (only…
Z X
  • 11
  • 2
0
votes
1 answer

Getting black screen after adding SceneDelegate to Flutter iOS project

After adding SceneDelegate to my Flutter iOS project I started getting a black screen when the app launched. I added the SceneDelegate by creating a file called SceneDelegate.swift with the following code. import Flutter @available(iOS 13.0,…
0
votes
1 answer

Firebase Dynamic Link Not working on App installation Scenedelegte

I'm using Firebase DynamicLinks SDK to show the Invite Popup to users, which is working fine when the app is installed for both Cases When App Is in the background When the App is Killed The link is redirecting the User to the store when the app…
0
votes
1 answer

Using async with SceneDelegate method is not setting the rootVC?

Im using Coordinator pattern and therefore setting window.rootViewController I need to perform some async operations. class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? var coordinator : MainCoordinator! //I have added…
Dzondzula
  • 81
  • 1
  • 8