Development Tip

실행 중 오류가 발생했습니다 (도메인 = LaunchServicesError, 코드 = 0).

yourdevel 2020. 11. 2. 19:50
반응형

실행 중 오류가 발생했습니다 (도메인 = LaunchServicesError, 코드 = 0).


Xcode 6을 사용하여 iOS 시뮬레이터에서 내 앱을 시작하려고 할 때 오류 (Domain = LaunchServicesError, Code = 0)를 받았습니다. Google에서 해결책을 찾았지만 실용적인 것을 찾지 못했습니다.

이 오류는 무엇을 의미합니까?


이 오류는 설치에 문제가 있음을 나타냅니다. 불행히도 Xcode는 더 많은 정보를 제공하는 오류 메시지의 내용을 실제로 인쇄하지 않지만 ~ / Library / Logs / CoreSimulator / CoreSimulator.log에서 나머지 오류 세부 정보를 볼 수 있습니다. 시뮬레이션 된 장치의 시스템 로그 (~ / Library / Logs / CoreSimulator / [장치 UDID] /system.log)에도 문제에 대한 자세한 정보가 있습니다. 오류 발생시 설치된 메시지를 찾으십시오).

이에 대한 일반적인 원인에는 Info.plist가 누락 된 번들, 번들의 Info.plist 내에서 누락 된 키 또는 허용되지 않는 Info.plist의 일부 키 값이 포함됩니다.

앱의 Info.plist에 유효한 CFBundleVersion 키 / 값 쌍이 포함되어 있지 않은 경우 앱이 처음에 올바르게 설치되지만 업데이트에 실패 할 수 있습니다. 많은 사용자가 각 설치 후 "Reset Contents & Settings"를 수행하여이 문제를 해결하는 것 같지만 Info.plist에서 적절한 CFBundleVersion을 설정하여 근본 원인을 수정하는 것이 좋습니다. iOS 8.2는 이제 업데이트뿐만 아니라이 경우 첫 번째 설치에서 오류를 올바르게 반환한다고 생각하므로 이제이 문제가 더 분명해질 것입니다.

하드 링크를 지원하지 않는 파일 시스템 (예 : AFP, SMB 또는 일부 NFS 서버를 통한 네트워크 홈 디렉토리)에 홈 디렉토리가있는 사용자는 하드 링크와 관련된 문제에 직면 할 수도 있습니다. 이 경우 시뮬레이터 개발을 위해 로컬 HFS + 파일 시스템에 경로 (예 : / var / simulator / [user])를 만들고 ~ / Library / Developer / CoreSimulator에서 해당 경로에 대한 심볼릭 링크를 만드는 것이 좋습니다. 이 특정 문제는 iOS 8.2 베타 중 하나에서 수정되었습니다.

또 다른 경우에는 Build & Run이 항상 첫 번째 시도에서 성공하지만 이후 시도는 변경된 Info.plist로 인해 실패하는 경우가 있습니다 (예 : 누군가의 빌드 시스템 설정으로 인해 CFBundleVersion이 각 반복에서 달라지기 때문입니다). 일반적으로 설치된 앱을 삭제 (홈 화면 또는에서 길게 누름 xcrun simctl uninstall [Device UDID] [app identifier])하거나 기기를 기본 상태로 다시 지워 복구 할 수 있습니다 . 장치를 지우려면 xcrun simctl erase [Device UDID]터미널 에서 실행 하거나 Erase Contents & SettingsiOS 시뮬레이터 메뉴에서 선택하십시오 . 이 특정 문제는 iOS 8.2 베타 중 하나에서 수정되었습니다.

이 문제의 새로운 인스턴스는 Xcode 6.2 사용자에게 발생합니다. 앱에 WatchKit App Extension이 번들로 포함되어있는 경우 iOS 8.2 이전 버전의 iOS Simulator 런타임에 설치할 수 없습니다. 해결 방법으로 iOS 8.1 및 이전 런타임으로 테스트하려는 경우 앱 확장 설치를 수동으로 비활성화해야합니다.

보다 구체적인 도움이 필요한 경우 CoreSimulator.log의 전체 오류 메시지와 ~ / Library / Logs / CoreSimulator / [Device UDID] /system.log에 거의 동시에 나타나는 installd 및 CoreSimulatorBridge의 모든 메시지를 다음과 같이 제공하십시오. 그것은 근본적인 문제를 드러 낼 것입니다.


프로젝트에 위젯 또는 확장이 포함되어 있습니까? 그렇다면 문제는 위젯 / 확장 프로그램의 번들 식별자 일 수 있습니다. 마침표와 추가 문자열이 추가 된 기본 대상과 동일해야합니다. 예를 들면 다음과 같습니다.

주요 목표 : com.mycompany.myapp

위젯은 다음과 같아야합니다. com.mycompany.myapp.widget


시뮬레이터를 재설정하여 수정했습니다.

iOS 시뮬레이터> 콘텐츠 및 설정 재설정 ...


모든 사람들이 무엇을 쓰기 때문에 그들이 겪은 방법 들은 고정 된 자신의 정확한 문제를, 그 인정 될 수 있습니다.

문제는 동일한 오류 메시지에 대해 다른 원인이 있으며이를 해결하는 올바른 방법은 ~/Library/Logs/CoreSimulator/CoreSimulator.log마지막 메시지 를 열어서 거기에서 찾는 것입니다. 이 메시지는 좋은 단서를 제공하고 문제를 해결하는 올바른 경로를 설정합니다 (때로는 번들 ID이며, 때로는 Info.plist에서 누락되거나 추가 속성이지만 항상 좋은 설명 적 단서를 얻습니다).

이것이 문제의 범위를 좁혀 결국 해결하는 방법입니다.

Xcode로 행운을 빕니다.)

지.


나를 위해 방금 프로젝트를 청소했고 작동했습니다-> 제품-> 청소


TLDR : 프로젝트 빌드 폴더를 지우면 이러한 고통에서 벗어날 수 있습니다.

(또한 Xcode에서이 문제를 해결할 방법을 찾아야하므로 Apple의 버그로 기록했습니다.)

이 솔루션 중 어느 것도 저에게 효과가 없었습니다. 저는 여러 벽에 머리를 부딪 혔습니다.
CoreSimulator 로그를보고 내가 삭제 한 라이브러리를 빌드하려고한다는 것을 깨달았습니다. 나는 그것에 대한 참조를 어디서도 찾을 수 없었습니다.

그런 다음 불행히도 참조 할 수없는 다른 SO 질문을 통해 보았습니다.

  1. 옵션 키를 누른 다음 제품-> 청소 옵션이 Clean Build Folder
  2. 그것을 누르고 오류가 사라지는 것을 즐기십시오.

"리셋 콘텐츠 및 설정" 에서 아이폰 OS Simutalor의 메뉴 옵션 및 후 시뮬레이터를 시작 끝내기가 내 문제를 해결했다.

콘텐츠 및 설정 재설정


XCode 6에서

실행 중 오류가 발생했습니다 (도메인 = LaunchServicesError, 코드 = 0).

iPhone 6 화면을 수용하기 위해 몇 가지 주요 코드를 변경 한 후이 오류가 발생했습니다. Xcode 6 (iOS8)

위의 옵션을 따랐고 실제로이 문제를 해결하는 유일한 방법은 다음을 수행하는 것입니다.

  1. 파생 데이터 삭제 [창 >> 오거나이저로 이동 >> (앱 찾기) 파생 데이터 옆 삭제 클릭]
  2. 제품 >> 청소
  3. 시뮬레이터에서 콘텐츠 및 설정 재설정
  4. 번들 버전이 pList의 1.4에서 1.4.1로 변경되었습니다.

    이 단계에 도달 한 모든 이전 답변에 감사드립니다. 매력적이었습니다!


제 경우에는 빌드 ID를 설정하지 않았기 때문에 오류가 발생했습니다.

이를 설정하면 문제없이 에뮬레이터가 시작됩니다.


시도해 볼 또 다른 한 가지는 시뮬레이터를 재설정하고 깨끗한 빌드를 수행 한 후 도움이되지 않은 파생 데이터를 지우는 것입니다. 이렇게하려면 : Organizer로 이동하여 프로젝트를 클릭하고 파생 데이터 삭제 버튼을 클릭합니다. 나는 한동안 연장 작업을 한 후에 이런 일이 발생하고 정규 지점으로 돌아갔습니다. 도움이 되었기를 바랍니다.


이것이 나에게 문제를 일으킨 이유입니다. 기본 앱과 확장의 빌드 번호가 달랐습니다 (기본 앱 빌드 번호를 1.0.1.03으로 늘 렸지만 확장은 1.0.1.02로 유지했습니다).

그것들을 일치 시켜서 문제가 해결되었습니다.


콘솔 앱을 열고 거기를보십시오. 제 경우에는 정확히 무엇을해야하는지 알려주었습니다. 나는 보았다:

ErrorDescription = WatchKit 2 앱 확장의 NSExtension.NSExtensionAttributes.WKAppBundleIdentifier 값이 WatchKit 앱의 번들 ID와 일치하지 않습니다 ( "com.myCompany.MyApp.MyApp.watchkitapp"발견, "com.myCompany.MyApp.watchkitapp"예상).

그래서 각 plist로 가서 BundleID와 관련된 항목을 확인했습니다. 그런 다음 청소하고 다시 시작하십시오.


빌드 구성에 따라 다른 번들 ID를 사용하도록 설정된 앱이 있습니다. 내 Apple Watch 확장 프로그램을 만들 때 Xcode는 내 릴리스 ID를 사용하여 모든 것을 생성했기 때문에 디버깅을 위해 수동으로 모두 변경해야했습니다. 변경해야하는 모든 장소는 다음과 같습니다.

  • WatchKit Extension'에스 Build Settings -> Packaging -> Product Bundle Identifier
  • WatchKit ExtensionInfo.plist -> NSExtension -> NSExtensionAttributes -> WKAppBundleIdentifier(컴패니언 앱과 동일한 접두사를 사용해야 함)
  • WatchKit App'에스 Info.plist -> WKCompanionAppBundleIdentifier

마지막 항목 WatchKit App은 대상 설정을 볼 때 's Info가 탭으로 표시되지 않기 때문에 잠시 시간이 걸렸기 때문에 Info.plist파일 자체 로 직접 이동해야했습니다 .


비어있는 경우 [TARGETS]-[일반]-[Identity]-[Version (or Build)]에 숫자를 입력하십시오.

그것은 나를 위해 일했습니다.

도움이 되길 바랍니다.


이 오류도 있습니다. 제 경우에는 로그 ~/Library/Logs/CoreSimulator/CoreSimulator.log가 다음과 같았습니다.

Could not hardlink copy /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Containers/Bundle/Application/70F24DDC-7954-46BF-B799-F807FD98yyyy/myApp.app to /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/Payload/myApp.app with manifest /Users/myUser/Library/Developer/CoreSimulator/Devices/60E569E7-6750-428A-A401-841BB081xxxx/data/Library/Caches/com.apple.mobile.installd.staging/temp.kOrJ9G/extracted/com.apple.deltainstallcommands.com.mycompagny.myapp

답변 덕분 에 내 앱 info.plist를 살펴보십시오. CFBundleVersion가 없어서 추가하고 이제 모든 것이 작동합니다!


위의 어느 것도 나를 위해 일하지 않았지만 이것은했습니다.

IceCream.xcworkspace / xcuserdata / xcuserdatad를 삭제 한 다음 시뮬레이터를 재설정하고 앱을 다시 실행했습니다. (시뮬레이터를 혼자 재설정하면 효과가 없었습니다.)


제 경우는 프레임 워크 컴파일에 관한 것입니다. Target- Build Phases- Embedded Frameworks-에서 '설치할 때만 복사'옵션을 활성화했습니다.여기에 이미지 설명 입력


iOS Simutalor 메뉴 옵션에서 "컨텐츠 및 설정 재설정"및 종료 후 시뮬레이터 실행으로 문제가 해결되었습니다.


The great explanation by Jeremy at least set me in the right direction, but despite having all the bundle identifiers and versions set correctly, the error still persisted. I then checked the Apple documentation which shows that the WatchKit extension (in its Copy Bundle Resources phase) copies the WatchKit app. This WatchKit app was named exactly the same as my iOS app, causing Xcode to confuse the two and read out the wrong plist, thinking the bundle identifier was incorrect. Renaming the Product of the WatchKit app to something distinct finally solved it for me.


If you've changed your bundle ID, make sure you do a clean build before trying to build it again! See how here: How to Empty Caches and Clean All Targets Xcode 4


So it's definitelly .plist problem. In my case it was empty NSExtensionMainStoryboard, removing this property fixed the problem


I had this error whilst trying to build Apple's Lister Xcode Project and run it on the simulator.

The essentials which fixed it for me were:

1) BundleID for the iOS App and the iOS Extension had to be different 2) I provide iCloud and App Groups for both targets 3) I used Xcode's "Fix Issue" to fix the issues

After that I could build and run the app without warnings or errors.

The clue from the log file was "... LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=450, NSLocalizedDescription=The parent bundle has the same identifier (com.ACMECompany.Lister) as sub-bundle at /Users/stephen/Library/Developer/CoreSimulator/Devices/5329928B-946B-40A4-B666-EFD11B96D11F/data/Library/Caches/com.apple.mobile.installd.staging/temp.HQ5d9X/extracted/Lister.app/PlugIns/Lister.appex"


Had a wrong app version set in InfoPlist.strings localization file. Urgh!

An hour gone!


여기에 이미지 설명 입력

Delete your simulator and regenerate one.

It works for me.


I removed the key in watch app's .plist file that shouldn't have been there. And the problem disappeared.


This worked for me: In project settings -> General tab -> Identity section I changed the Version number from something like 2.0.2 (three digits) to 2.0 (two digits) then I deleted the app in the simulator and run the project again. No more error after that.


One other possible solution to add to all of the others that will no doubt stay above mine ;)

I deleted & later reinstated a Today Extension target retaining the source files, but after trying every solution under the sun, I realised it didn't have any sources or resources in its target! You might encounter this as well if your detailed launch services error can't find your compiled app extension file.

So, long story short, make sure your target has something included to compile or bundle in there. You can check your target memberships by selecting the relevant file(s) on your project navigator (on the left) and setting your checkmark(s) as appropriate in the file inspector (that's the first tab on the right).


I had the following in my log...

<Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=ExecutableTwiddleFailed...

This was due to there being no source files added in the extension project.


This error was showing up on my system when there was no hard disk space available. I freed up some space on my system for it to work.


My Problem was that the wrapper extension for the target project was unset.

수정하려면 대상 프로젝트 -> 빌드 설정 -> 패키징 -> 래퍼 확장으로 이동해야했습니다 .

이것을 "app"(따옴표 없음)로 설정하십시오.

이것은 나를 위해 문제를 해결했습니다.

참고 URL : https://stackoverflow.com/questions/25632886/an-error-was-encountered-while-running-domain-launchserviceserror-code-0

반응형