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
0
votes
1 answer

Is it possible to create a Fetch Request for core data entities within Scene Delegate for SwiftUI

I'm trying to keep synchronize my core data entities with a webservice i'm using. The issue is the web service updates the items every day, so I'm trying to create a fetch request to compare the cached items with the remote items and update the…
Lylaak
  • 93
  • 1
  • 8
0
votes
1 answer

App crashing after implementing Firebase Auth listener in Scene Delegate

I have implemented Firebase Auth (sign in with Apple) and Firebase firestore in an app live on the App Store. I implemented a listener for authentication state in the scene delegate from the firebase documentation.…
Sully07
  • 11
  • 2
0
votes
2 answers

XCODE 11 - Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate window]:

Recently i updated to the XCODE 11 and came to know the concepts of SceneDelegate and AppDelegate . This is my simple code for in AppDelegate : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary…
User1075
  • 819
  • 15
  • 36
0
votes
1 answer

Is it possible to run initialization code just after the default init code runs?

During iOS development I'm using a lot of classes which come from proprietary code which I have no access to. I want to run custom code that should run when this class is instantiated into an object, but I don't know how to, as I can't really…
Hamster
  • 133
  • 3
  • 12
0
votes
1 answer

iOS 13 - applicationWillTerminate from UIApplicationDelegate equivalent for UISceneDelegate?

I'm using iOS 13 and its new UISceneDelegate and I want to execute a function when app is killed. I used to use the applicationWillTerminate function from UIApplicationDelegate but I don't see this function in UISceneDelegate. So what is the best…
nelson PARRILLA
  • 498
  • 1
  • 6
  • 17
0
votes
1 answer

Local notifications didReceive in iOS 13

I am implementing notifications in my app and I can not figure out how to go to a specific view controller when the user presses on the notification. Since iOS 13, my app is using SceneDelegate, but the function: userNotificationCenter(_ center:…
fphelp
  • 1,544
  • 1
  • 15
  • 34
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
0
votes
1 answer

SceneDelegate - Result of call to 'flatMap' is unused

Hi everyone I'm working with Firebase authentication with which I allow the user to log in with his email and a verification link that is sent to his email ... Everything works but with iOS 13 I have to use SceneDelegate instead of AppDelegate and…
kAiN
  • 2,559
  • 1
  • 26
  • 54
0
votes
2 answers

Swift -Transition to SceneDelegate

Before iOS 13 I would use a transition to go from my LoginVC to my TabBarController. How would I accomplish the following for SceneDelegate? This app has only 1 scene/window @objc func buttonTapped() { let transition = CATransition() …
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0
votes
2 answers

Logout for an app which having multiple storyboards swift 5 (Going back to root view controller)

How to go back to rootview controller in swift 5 where scenedelegate is available instead of Appdelegate func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this…
Midhun Narayan
  • 829
  • 2
  • 9
  • 26
0
votes
1 answer

Xcode 11. SceneDelegate func willConnectTo. Not accepting a func with Properties

I want to insert a func(configureInitialViewController()) into willConnectTo ( so I can recall the same func in other ViewControllers ) class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene:…
0
votes
1 answer

Set rootViewController programmatically not working, picking initial view controller from storyboard only in Xcode 11

Trying to change the root view controller programmatically, initially in storyboard as initial view controller is checked. Every time same viewController is opened which is set up as initialViewController in storyboard. Please guide. Sharing below…
iPhone 7
  • 1,731
  • 1
  • 27
  • 63
0
votes
2 answers

"Enable Multiple Windows" setting for an iOS 13 app (iPhone only)

I'm aware that the new info.plist file has some new Application Scene Manifest entry as of XCode 11 and iOS 13 only projects, however, what's the benefit of having Enable Multiple Windows option in this manifest, if I only choose that my app is only…
JAHelia
  • 6,934
  • 17
  • 74
  • 134
0
votes
1 answer

Instantiating Window from AppDelegate Failing in Swift 5.0

I'm using Xcode 11 and Swift 5.0. I copied over my code from another app that used Swift 4.2. That code instantiates a tabBarViewController in the AppDelegate, changes the window to the tabBarVC and shows it if certain conditions are met. But it…
TM Lynch
  • 403
  • 3
  • 13
-1
votes
1 answer

Which folder to put the App and Scene Delegate files in Swift?

I am having a problem to decide on which folder to put the app and delegate in. My project structure is like this. Should I create a folder for each of them with their names or create a folder called "Supporting files" ? Can someone give me an…
1 2 3
10
11