ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [iOS교육] XCode가 생성한 파일 삭제 방법
    Programming/Swift(iOS) 2023. 5. 4. 09:31
    728x90

    XCode가 자동 생성한 파일을 제거하는 방법 #1

    1) 자동 생성된 파일 제거

    .swift 파일 3개 AppDelegate, SeceneDelegate, ViewController
    storyboard 파일 2개 Main, LaunchScreen

    2) info에서 "Application Scene Manifest" 제거

    3) 프로젝트 설정에서 아래 2개 항목 값을 제거(공백상태)

    • Main Interface
    • Launch screen File

    emulator로 실행시켜보면, 앱이 실행되었다가 바로 사라짐

     

    XCode가 자동 생성한 파일을 제거하는 방법 #2

    1) 자동 생성된 파일 제거

    .swift 파일 3개 SeceneDelegate, ViewController
    storyboard 파일 2개 Main, LaunchScreen

    2) info에서 "Application Scene Manifest" 제거

    3) 프로젝트 설정에서 아래 2개 항목 값을 제거(공백상태)

    • Main Interface
    • Launch screen File

    4) AppDelegate에서 SceneDelegate 함수 2개 제거

    5) AppDelegated에서 @main 추가

    //
    //  AppDelegate.swift
    //  AppDel1
    //
    //  Created by hy on 2023/05/04.
    //
    
    import UIKit
    
    @main
    class AppDelegate: UIResponder, UIApplicationDelegate {
    
    
    
        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            // Override point for customization after application launch.
            return true
        }
    }

    emulator로 실행시켜보면, 앱이 실행되었다가 바로 사라짐

Designed by Tistory.