Can't run iPhone simulator - file “Logs” could

2019-04-18 06:34发布

iPhone simulator doesn't work. Displays error message:

The file “Logs” couldn’t be saved in the folder “Library” because a file with the same name already exists.

When /Logs dir is empty, simulator creates subdir CoreSimulator/[AppID] and dispalys the above message. It's fresh OS X Yosemite, installed on new Mac Mini.

Any idea how to fix this issue ?

4条回答
狗以群分
2楼-- · 2019-04-18 07:10

Try to reset the Ios Simulator settings it worked for me!

iOS Simulator -> Reset Content and Settings...

查看更多
别忘想泡老子
3楼-- · 2019-04-18 07:12

I solved this (Xcode 7.1) with:

find ~/Library/Developer/XCPGDevices -name Logs* -exec rm -fr {} \;
查看更多
手持菜刀,她持情操
4楼-- · 2019-04-18 07:16

Just to make it more clear (In addition to @storm's answer):

enter image description here

查看更多
放我归山
5楼-- · 2019-04-18 07:27

I suspect that you manually deleted ~/Library/Logs/CoreSimulator and the error message is because the sim is failing to create the ~/Library/Developer/CoreSimulator/Devices//data/Library/Logs symlink because it already exists.

You should be able to get out of this situation by resetting the device by running 'xcrun simctl erase [udid]'

查看更多
登录 后发表回答