最近工程遇到一次问题,第一次运行程序到模拟器正常,第二次再运行就报错,删掉模拟器上的程序就好了;查了半天终于找到了原因,写下来防止大家也浪费时间:
原来在于我的工程做了本地化:具体设计到三个地方都要有以下两个字段:
"CFBundleShortVersionString" = "2.1.1";
"CFBundleVersion" = "2.1.1";
一旦缺少就会出现我遇到的错误。
具体需要注意的三个地方:
哦了,问题解决!
附录:
具体错误形式:
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}