[iOS] AppDelegate 만들기

임주희·2022년 11월 11일
0

SwiftUI로 프로젝트를 만들면 AppDelegate 파일이 없어요.
직접 AppDeleage 파일을 생성하고 아래처럼 만드시면 됩니다.

import UIKit
import FirebaseCore

class AppDelegate: NSObject, UIApplicationDelegate {
    
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

		//...
    
         return true
    }
    
}

그리고 {앱이름}App.swift 파일에 한줄 추가해주세요.

@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate

0개의 댓글

관련 채용 정보