Skip to content

Commit 20a3fd6

Browse files
committed
Migrate notifications to UIScene
1 parent f763fe0 commit 20a3fd6

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

XBMC Remote/BaseMasterViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ - (void)viewDidLoad {
3636

3737
[[NSNotificationCenter defaultCenter] addObserver:self
3838
selector:@selector(handleDidEnterBackground:)
39-
name:UIApplicationDidEnterBackgroundNotification
39+
name:UISceneDidEnterBackgroundNotification
4040
object:nil];
4141

4242
[[NSNotificationCenter defaultCenter] addObserver:self
4343
selector:@selector(handleEnterForeground:)
44-
name:UIApplicationWillEnterForegroundNotification
44+
name:UISceneWillEnterForegroundNotification
4545
object:nil];
4646

4747
[[NSNotificationCenter defaultCenter] addObserver:self

XBMC Remote/HostManagementViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ - (void)enableTCPconnection {
740740
withParameters:parameters
741741
onCompletion:^(NSString *methodName, NSInteger callId, id methodResult, DSJSONRPCError *methodError, NSError *error) {
742742
if (error == nil && methodError == nil) {
743-
[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationWillEnterForegroundNotification object:nil userInfo:nil];
743+
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification object:nil userInfo:nil];
744744
}
745745
else {
746746
UIAlertController *alertCtrl = [Utilities createAlertOK:LOCALIZED_STR(@"Cannot do that") message:nil];

XBMC Remote/NowPlaying.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,12 +2679,12 @@ - (void)viewWillAppear:(BOOL)animated {
26792679

26802680
[[NSNotificationCenter defaultCenter] addObserver:self
26812681
selector:@selector(handleEnterForeground:)
2682-
name:UIApplicationWillEnterForegroundNotification
2682+
name:UISceneWillEnterForegroundNotification
26832683
object:nil];
26842684

26852685
[[NSNotificationCenter defaultCenter] addObserver:self
26862686
selector:@selector(handleDidEnterBackground:)
2687-
name:UIApplicationDidEnterBackgroundNotification
2687+
name:UISceneDidEnterBackgroundNotification
26882688
object:nil];
26892689

26902690
[[NSNotificationCenter defaultCenter] addObserver:self

XBMC Remote/RemoteController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ - (void)viewWillAppear:(BOOL)animated {
10461046

10471047
[[NSNotificationCenter defaultCenter] addObserver:self
10481048
selector:@selector(handleDidBecomeActive)
1049-
name:UIApplicationDidBecomeActiveNotification
1049+
name:UISceneDidActivateNotification
10501050
object:nil];
10511051

10521052
[self.avCaptureDevice addObserver:self

XBMC Remote/SDWebImage/SDImageCache.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ - (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory
141141

142142
[[NSNotificationCenter defaultCenter] addObserver:self
143143
selector:@selector(backgroundCleanDisk)
144-
name:UIApplicationDidEnterBackgroundNotification
144+
name:UISceneDidEnterBackgroundNotification
145145
object:nil];
146146
#endif
147147
}

XBMC Remote/VolumeSliderView.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ - (id)initWithFrame:(CGRect)frame leftAnchor:(CGFloat)leftAnchor isSliderType:(B
138138

139139
[[NSNotificationCenter defaultCenter] addObserver:self
140140
selector:@selector(handleDidBecomeActive:)
141-
name:UIApplicationDidBecomeActiveNotification
141+
name:UISceneDidActivateNotification
142142
object:nil];
143143

144144
[[NSNotificationCenter defaultCenter] addObserver:self
145145
selector:@selector(handleDidEnterBackground:)
146-
name:UIApplicationDidEnterBackgroundNotification
146+
name:UISceneDidEnterBackgroundNotification
147147
object:nil];
148148
}
149149
return self;

XBMC Remote/tcpJSONRPC.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ - (id)init {
2929

3030
[[NSNotificationCenter defaultCenter] addObserver:self
3131
selector:@selector(handleDidBecomeActive:)
32-
name:UIApplicationDidBecomeActiveNotification
32+
name:UISceneDidActivateNotification
3333
object:nil];
3434

3535
[[NSNotificationCenter defaultCenter] addObserver:self
3636
selector:@selector(handleDidEnterBackground:)
37-
name:UIApplicationDidEnterBackgroundNotification
37+
name:UISceneDidEnterBackgroundNotification
3838
object:nil];
3939

4040
[[NSNotificationCenter defaultCenter] addObserver:self

0 commit comments

Comments
 (0)