Xcode11 SceneDelegate 제거하지 않고 iOS13 이하버전 호환하기

2020. 7. 1. 00:02개발자료/iOS


반응형

1. Target iOS13 미만으로 변경

2. AppDelegate.h 에 코드 추가

@property (nonatomic, strong) UIWindow *window;

3. AppDelegate.m 수정

Fix 버튼을 눌러 API_AVAILABLE(ios(13.0) 코드를 추가시킨다.

- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options

- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions

4. SceneDelegate.m 수정

Fix 버튼을 눌러 API_AVAILABLE(ios(13.0) 코드를 추가시킨다.

- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions

- (void)sceneDidDisconnect:(UIScene *)scene

- (void)sceneDidBecomeActive:(UIScene *)scene

- (void)sceneWillResignActive:(UIScene *)scene

- (void)sceneWillEnterForeground:(UIScene *)scene

- (void)sceneDidEnterBackground:(UIScene *)scene

반응형