본문 바로가기

iOS 개발

Xcode 시뮬레이터 에러 해결 (This app could not be installed at this time.)

시뮬레이터를 실행할 때 마다 발생하는데, 아주 오랫동안 해결하지 못했던 에러가 있었다.

 

This app could not be installed at this time.

Could not install at this time.

Could not hardlink copy /Users/username/Library/Developer/CoreSimulator/Devices/96940023-3B14-4E40-A2CE-BB68392C616D/data/Containers/Bundle/Application/84045018-986C-4151-9EA9-3F4E79C5CA03/(프로젝트명).app to /Users/username/Library/Developer/CoreSimulator/Devices/96940023-3B14-4E40-A2CE-BB68392C616D/data/Library/Caches/com.apple.mobile.installd.staging/temp.ukiY4o/extracted/Payload/(프로젝트명).app with manifest /Users/username/Library/Developer/CoreSimulator/Devices/96940023-3B14-4E40-A2CE-BB68392C616D/data/Library/Caches/com.apple.mobile.installd.staging/temp.ukiY4o/extracted/com.apple.deltainstallcommands.(bundleId)

 

Xcode로 개발하다가 시뮬레이터 실행을 하면 빌드는 되는데 앱 실행이 안되는 에러였다.

 

구글링 결과, 시뮬레이터 리셋->프로젝트 클린 하는 방법이 나왔다.

 

1. 시뮬레이터 리셋->프로젝트 클린 하는 방법

1-1) 시뮬레이터 리셋

시뮬레이터 메뉴 Device > Erase All Content and Settings (시뮬레이터 초기화를 실행한다.)

 

1-2) Xcode 메뉴 Product > Clean Build Folder (프로젝트 Clean)

shift+cmd+k (프로젝트 Clean)

shift+opt+cmd+K (프로젝트 폴더 Clean)

주로 위의 2단계 방법으로 해결이 되었다고 나오고, 그 외 Derived Data 폴더 내부를 모두 삭제하는 해결법도 있었다.

그러나 나의 경우 위 방법을 실행한 후 한번만 실행이 되고 두번째 실행부터는 다시 에러가 발생했다.

시뮬레이터를 실행할 때마다 매번 위 단계를 거쳐야하는것..

 

이 에러를 오랫동안 해결 못했었는데 최근 다른 해결법을 찾게 되었다.

 

 

2. 프로젝트 앱 이름 한글->영문 변경하는 방법

나의 경우 프로젝트의 Products 폴더 내 '프로젝트한글명.app' 으로 설정이 되어 있었다.

2-1) TARGETS > Build Settings > Packaging > Product Name ( "한글명"->"영문명" 로 변경)

 

2-2) Info.plist > Bundle name ( "&(PRODUCT_NAME)"->"원하는 앱이름 한글명" 로 변경)

 

이렇게 진행한 후 다시 프로젝트의 Products 폴더 내 app파일명을 살펴보면 위에서 한글이었던 앱 이름이 Product Name 에서 설정한 영문명으로 바뀌어 있을 것이다. (빌드 후 앱 설치를 하면 앱의 이름은 한글명으로 보여진다.)

 

 

이렇게 바꾸고 난 후 시뮬레이터 에러가 사라졌다.

(혹시 안된다면 영문명 변경 후, 1번 방법인 시뮬레이터 초기화 및 프로젝트 클린 작업을 한번 진행 후 다시 시도해보세요.)

(시뮬레이터 초기화는 각 기기별로 해주어야 합니다.)