File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,22 @@ class SessionInitiator {
4545
4646 let notificationCenter = NotificationCenter . default
4747 #if os(iOS) || os(tvOS) || os(visionOS)
48- notificationCenter. addObserver (
49- self ,
50- selector: #selector( appBackgrounded) ,
51- name: UIApplication . didEnterBackgroundNotification,
52- object: nil
53- )
48+ // Change background update event listerner for iPadOS 26 multi-windowing supoort
49+ if #available( iOS 26 , * ) , UIDevice . current. systemName. lowercased ( ) . contains ( " ipados " ) {
50+ notificationCenter. addObserver (
51+ self ,
52+ selector: #selector( appBackgrounded) ,
53+ name: UIApplication . willResignActiveNotification,
54+ object: nil
55+ )
56+ } else {
57+ notificationCenter. addObserver (
58+ self ,
59+ selector: #selector( appBackgrounded) ,
60+ name: UIApplication . didEnterBackgroundNotification,
61+ object: nil
62+ )
63+ }
5464 notificationCenter. addObserver (
5565 self ,
5666 selector: #selector( appForegrounded) ,
You can’t perform that action at this time.
0 commit comments