1. 프로젝트 네비게이터(Xcode 좌측 메뉴바, 단축키 : cmd + 1) 에서 main.storyboard 파일 제거
2. 해당 타겟의 build settings에서 info.plist Values에서 UIKit Main Storyboard File Base Name 제거(키-값 모두 제거)
3. 프로젝트 네비게이터의 info.plist에서 Storyboard Name 키-값 모두 제거
위 상태에서 실행 시
Bundle에서 Main의 이름을 가진 스토리 보드를 찾을 수 없다는 에러 반환.
4. Scene delegate에 root viewcontroller 설정을 위한 코드 추가.
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
let vc = ViewController()
window.rootViewController = vc
self.window = window
window.makeKeyAndVisible()
}
}
'IOS' 카테고리의 다른 글
Swift Objective C 네임 맹글링(Name Mangling) 문제 (0) | 2024.06.24 |
---|---|
iOS build fail User Script Sandboxing sandbox: rsync.samba(12741) deny(1) (0) | 2024.06.02 |
iOS @available 속성 설정 (0) | 2024.04.23 |
new Framework(*) Unreal Engine에서 iOS Framework 적용하기 (0) | 2024.04.09 |
프로토콜과 기본 구현 extension ProtocolA where Self: Type 프로토콜 타입 제약 방법 (0) | 2024.03.15 |