3 * Copyright (c) 2020 Project CHIP Authors
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #import "SceneDelegate.h"
20 @interface SceneDelegate ()
24 @implementation SceneDelegate
26 - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions
28 // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
29 // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
30 // This delegate does not imply the connecting scene or session are new (see
31 // `application:configurationForConnectingSceneSession` instead).
34 - (void)sceneDidDisconnect:(UIScene *)scene
36 // Called as the scene is being released by the system.
37 // This occurs shortly after the scene enters the background, or when its session is discarded.
38 // Release any resources associated with this scene that can be re-created the next time the scene connects.
39 // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions`
43 - (void)sceneDidBecomeActive:(UIScene *)scene
45 // Called when the scene has moved from an inactive state to an active state.
46 // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
49 - (void)sceneWillResignActive:(UIScene *)scene
51 // Called when the scene will move from an active state to an inactive state.
52 // This may occur due to temporary interruptions (ex. an incoming phone call).
55 - (void)sceneWillEnterForeground:(UIScene *)scene
57 // Called as the scene transitions from the background to the foreground.
58 // Use this method to undo the changes made on entering the background.
61 - (void)sceneDidEnterBackground:(UIScene *)scene
63 // Called as the scene transitions from the foreground to the background.
64 // Use this method to save data, release shared resources, and store enough scene-specific state information
65 // to restore the scene back to its current state.