xcode The document “…” could not be saved

前端 未结 15 2921
谎友^
谎友^ 2021-02-20 00:31

I use xcode 3.2.4 on snow leopard. Today when I tried to save a file on my project I get an error message saying: The document \"nameOfFile.m\" could not be saved. I tried reins

相关标签:
15条回答
  • 2021-02-20 01:07

    Force quiting Xcode for me worked. I would recommend the same.

    0 讨论(0)
  • 2021-02-20 01:08

    Simply by rebooting the computer the issue was fixed.

    0 讨论(0)
  • 2021-02-20 01:08

    We were having this problem in a lab environment where user files are mounted via NFS. The client machines are running OS X 10.6.7 and the file server is running Debian Linux. After much grief and reading /var/log/syslog on the client machine I discovered it was a subtle file locking / race condition issue with the file system. Evidently, when editing files in a "bundle" (e.g. as in an Xcode project), the OS is using some form of "safe writes" which involves writing transient data atomically to ~/Library/Caches/TemporaryItems/ (which of course is on the NFS mounted system) -- there is a race here that requires proper file locking. We hope we have fixed the problem by changing the nfs_mount options as described in Mounting NFS volumes in OS X

    0 讨论(0)
  • 2021-02-20 01:10

    Thanks @Wayne Cochran,

    When I use Xcode to save it, I rebooted the machine several times, and all failed.

    So I changed to Visual Studio Code to edit and save. Then it's OK.

    Just change the file editor

    0 讨论(0)
  • 2021-02-20 01:11

    I restarted XCode (by a force-quit, not just closing it) and that fixed it for me.

    0 讨论(0)
  • 2021-02-20 01:14

    Hey........... even i faced the same problem..... But got the answer...... steps:

    1. reveal in folder the project.
    2. select the file that is locked
    3. select 'GEt Info'
    4. deselect ie uncheck the label 'LOCKED' in the Info.
    0 讨论(0)
提交回复
热议问题