Xcode - info.plist 파일이 없어졌을때 해결
Xcode 13 부터 신규 프로젝트 생성시 info.plist 파일이 프로젝트 내부로 들어가 디렉토리 상에서 찾을수가 없습니다.
* 프로젝트 내부는 Project -> Targets -> Info -> Custom iOS Target Properties 에 있음!
하지만, 디렉토리 상에 다시 추가 하고싶으면 다음과 같이 처리 하면 됩니다.
1. 신규 파일 추가
- 신규 Property List 파일을 추가합니다 (파일명은 info.plist)
2. 설정 변경
2-1. 생성한 파일에서 Full Path 를 복사해둡시다.
2-2. Project -> Build Settings -> Packaging -> info.plist File 에 방금 복사 했던 내용을 붙여넣기 합니다.
2-3. Project -> Build Settings -> Packaging -> Generate Info.plist File 설정 값을 No 로 변경 해줍니다.
2-4. Project -> Build Phases -> Info.plist 하단에 - 클릭하여 제거 해줍니다.
3. 내용 추가
- 보시다시피 아무런 내용이 없습니다. 이 내용을 채워주도록 합시다.
- 물론 프로젝트 상에 있는 내용을 우클릭해서 (하나씩 하나씩) 추가할순 있습니다. 하지만 내용이 많기때문에 해당 내용을 복붙 합니다.
- 중간중간에 함정이 있으니 피해서 복붙 하시면 됩니다.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>@@@@@@@@@@@@@프로젝트명(PlistProject)@@@@@@@@@@@@@</string>
<key>CFBundleExecutable</key>
<string>@@@@@@@@@@@@@프로젝트명(PlistProject)@@@@@@@@@@@@@</string>
<key>CFBundleIdentifier</key>
<string>@@@@@@@@@@@@@패키지명(com.moonggi.PlistProject)@@@@@@@@@@@@@</string>
<key>CFBundleName</key>
<string>@@@@@@@@@@@@@프로젝트명(PlistProject)@@@@@@@@@@@@@</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchScreen</key>
<dict>
<key>UILaunchScreen</key>
<dict/>
</dict>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~iphone</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
참고 : https://useyourloaf.com/blog/xcode-13-missing-info.plist/
Xcode 13 Missing Info.plist
Projects created with Xcode 13 don't need an Info.plist file. Xcode creates one automatically when you change the default settings.
useyourloaf.com