Skip to content

Commit d5781e9

Browse files
jaeoptthomaszurkan-optimizely
authored andcommitted
remove unused codes for coverage fix (#227)
1 parent 8ccb2cb commit d5781e9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

OptimizelySDK/Protocols/BackgroundingCallbacks.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,14 @@ import UIKit
2424

2525
extension BackgroundingCallbacks {
2626
func subscribe() {
27-
#if swift(>=4.2)
27+
// swift4.2+
2828
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
2929
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive), name: UIApplication.didBecomeActiveNotification, object: nil)
30-
#else
31-
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground), name: .UIApplicationDidEnterBackground, object: nil)
32-
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive), name: .UIApplicationDidBecomeActive, object: nil)
33-
#endif
3430
}
3531

3632
func unsubscribe() {
37-
#if swift(>=4.2)
33+
// swift4.2+
3834
NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
3935
NotificationCenter.default.removeObserver(self, name: UIApplication.didBecomeActiveNotification, object: nil)
40-
#else
41-
NotificationCenter.default.removeObserver(self, name: .UIApplicationDidEnterBackground, object: nil)
42-
NotificationCenter.default.removeObserver(self, name: .UIApplicationDidBecomeActive, object: nil)
43-
#endif
4436
}
4537
}

0 commit comments

Comments
 (0)