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 {
45
45
46
46
let notificationCenter = NotificationCenter . default
47
47
#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
+ }
54
64
notificationCenter. addObserver (
55
65
self ,
56
66
selector: #selector( appForegrounded) ,
You can’t perform that action at this time.
0 commit comments