当使用xcode写代码时,每隔几秒,总是会出现Click Save Anyway to keep your changes and save the changes made by the other application as a version, or click Revert to keep the changes from the other application and save your changes as a version.You can also click Save As to save your changes to a different file.
如下图所示:
参考:https://answers.microsoft.com/en-us/msoffice/forum/msoffice_drive-mso_mac-mso_365hp/editing-files-on-onedrive-with-on-demand-feature/a7d67439-e5b6-4f38-b327-96ddc4663b25
原因是xcode写的代码是在onedrive这类动态同步的文件夹中,onedrive不断扫描文件的更新内容并将最新的结果上传到服务器,所以xcode提示文件被其它应用所改变。
解决方法:不要把写的代码放入onedrive中,把代码放在普通的文件夹中,之后每次操作都不会跳出这个提示。