簡體   English   中英

從Xcode重新安裝應用程序時,iPhone模擬器報告錯誤

[英]iPhone simulator reporting error when re-installing an app from Xcode

我正在使用Xcode 6和iOS模擬器版本8.1(版本550.3)。

當我在Xcode中選擇“Build and Run”時,如果應用程序尚未安裝在模擬器中,則一切正常。 但是,如果是,我在Xcode中收到以下錯誤:

無法在模擬器中運行應用程序運行時遇到錯誤(Domain = LaunchServicesError,Code = 0)

並且模擬器的日志顯示如下:

less ~/Library/Logs/CoreSimulator/CoreSimulator.log
Nov  6 11:53:47 Yggdrasil.local com.apple.dt.Xcode[4389] <Error>: 
Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed.
 (LaunchServicesError error 0.)" UserInfo=0x7fa697742360 
{Error=PackagePatchFailed, ErrorDescription=Could not hardlink copy 
/Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Containers/Bundle/Application/FEE2DEB4-AEE3-48B7-BE71-5B027259C6FD/Baby Feeding.app 
to /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/Payload/Baby Feeding.app
 with manifest /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/com.apple.deltainstallcommands.com.owlcoding.babyfeeding}

/Volumes/UsersData/Users/kender是我的$HOME )。

我試圖刪除所有模擬器(從Xcode中的Devices窗口重新添加它們 - 沒有運氣。

我刪除了整個〜/ Library / Developer目錄並允許Xcode重新創建它 - 之后也是同樣的問題。

所以現在我堅持使用構建和運行 - >進行更改 - >刪除應用程序 - >構建和運行流程,哪種糟糕...任何人遇到這樣的問題並找到解決方案,或者你們有一些指針對我來說......

我有同樣的問題,這是由於Info.plist的本地化。

我的應用程序已本地化為多種語言,每個本地化都有一個帶有CFBundleShortVersionString鍵的InfoPlist.strings文件。 我更改了目標信息上的Version字符串,但沒有更改InfoPlist.strings文件中的Version字符串。

所以我刪除了模擬器中的應用程序,在所有本地化的Info.plist文件中更新了CFBundleShortVersionString以匹配Target上的版本,這解決了我的問題。

該錯誤表示由於硬鏈接導致安裝失敗。 我懷疑$ HOME的文件系統不支持硬鏈接。 請更新您的問題以指定文件系統/ Volumes / UsersData的類型。

如果無法支持/ Volumes / UsersData上的硬鏈接,那么我建議您為模擬器數據創建一個本地目錄,並從〜/ Library / Developer / CoreSimulator / Devices創建一個符號鏈接。

同樣在旁注中,刪除所有〜/ Library / Developer可能會破壞正在運行的模擬器服務。 如果你這樣做,請確保退出Xcode,iOS模擬器,樂器等,但也要確保通過運行killall -9 com.apple.CoreSimulator.CoreSimulatorService來殺死服務。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM