ALL BUSINESS
COMIDA
DIRECTORIES
EDUCATIONAL
ENTERTAINMENT
FASHION TIPS
FINER THINGS
FREE CREATOR TOOLS
HEALTH
MARKETPLACE
MEMBER's ONLY
MONEY MATTER$
MOTIVATIONAL
NEWS & WEATHER
TECHNOLOGIA
TELEVISION NETWORKS
USA VOTES 2024
VIDEOS
INVESTOR RELATIONS
IN DEVELOPMENT
Posted by - Latinos MediaSyndication -
on - April 30, 2023 -
Filed in - Technology -
-
311 Views - 0 Comments - 0 Likes - 0 Reviews
I am experiencing some strange behavior in my app. Sometimes, when users kill the app, SceneDelegate.init() and scene(_:willConnectTo:options:) are called again which causes running the app init flow again. This results in some unexpected behavior and the app crashes.
AppDelegate:
class AppDelegate: UIResponder, UIApplicationDelegate { func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } ... }
SceneDelegate:
class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? override init() { super.init() print("Init") } func scene(_ scene: UIScene, willConnectTo _: UISceneSession, options: UIScene.ConnectionOptions) { guard let scene = (scene as? UIWindowScene) else { return } print("App starting") ... } }
My stack trace looks like this (after killing the app):
Could it be some bug in the iOS, or there is something wrong on my side?
Thank you.