hello.
are you still looking here?
A few days have passed since I made changes to the app, but after making changes and updating, the number of crash reports for iOS 15.7 has drastically decreased.
I don't know if it will reduce your number of crashes as your case is a bit different, but I will share what I have done.
The code I added is below.
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.window = self.window
guard let _ = (scene as? UIWindowScene) else { return }
}
@available(iOS, introduced: 15.7, obsoleted: 16.0)
@objc extension SKStoreProductViewController {
func sceneDisconnected(_ arg: AnyObject) { }
func appWillTerminate() { }
}