@@ -51,24 +51,34 @@ public class OneSignalCoreMocks: NSObject {
51
51
}
52
52
53
53
@objc public static func backgroundApp( ) {
54
+ print ( " ❌ calling OneSignalCoreMocks.backgroundApp " )
54
55
if OSBundleUtils . isAppUsingUIScene ( ) {
56
+ print ( " ❌ isAppUsingUIScene: true " )
55
57
if #available( iOS 13 . 0 , * ) {
58
+ print ( " ❌ inside #available(iOS 13.0, *) " )
56
59
NotificationCenter . default. post ( name: UIScene . willDeactivateNotification, object: nil )
57
60
NotificationCenter . default. post ( name: UIScene . didEnterBackgroundNotification, object: nil )
58
61
}
62
+ print ( " ❌ after #available(iOS 13.0, *) " )
59
63
} else {
64
+ print ( " ❌ isAppUsingUIScene: false " )
60
65
NotificationCenter . default. post ( name: UIApplication . willResignActiveNotification, object: nil )
61
66
NotificationCenter . default. post ( name: UIApplication . didEnterBackgroundNotification, object: nil )
62
67
}
63
68
}
64
69
65
70
@objc public static func foregroundApp( ) {
71
+ print ( " ❌ calling OneSignalCoreMocks.foregroundApp " )
66
72
if OSBundleUtils . isAppUsingUIScene ( ) {
73
+ print ( " ❌ isAppUsingUIScene: true " )
67
74
if #available( iOS 13 . 0 , * ) {
75
+ print ( " ❌ inside #available(iOS 13.0, *) " )
68
76
NotificationCenter . default. post ( name: UIScene . willEnterForegroundNotification, object: nil )
69
77
NotificationCenter . default. post ( name: UIScene . didActivateNotification, object: nil )
70
78
}
79
+ print ( " ❌ after #available(iOS 13.0, *) " )
71
80
} else {
81
+ print ( " ❌ isAppUsingUIScene: false " )
72
82
NotificationCenter . default. post ( name: UIApplication . willEnterForegroundNotification, object: nil )
73
83
NotificationCenter . default. post ( name: UIApplication . didBecomeActiveNotification, object: nil )
74
84
}
0 commit comments