简体   繁体   中英

Can't run iPhone simulator - file “Logs” couldn't be saved

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 ?

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

iOS Simulator -> Reset Content and Settings...

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

在此输入图像描述

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]'

我解决了这个问题(Xcode 7.1):

find ~/Library/Developer/XCPGDevices -name Logs* -exec rm -fr {} \;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM