TransWikia.com

The document “ViewController.swift” could not be saved. The file doesn’t exist

Stack Overflow Asked by Rezo Joglidze on December 9, 2021

When I move ViewController.swift file another group X-code show popup and I click re-save. after all when I try to close my project Xcode show this message The document “ViewController.swift” could not be saved. The file doesn’t exist.

2 Answers

This happens quite often when moving files around.

What I do:

  • Locate the file in your project folder and drag to desktop
  • In xcode delete the file
  • Close Xcode, you may have to force quit if it keeps showing the The document “ViewController.swift” could not be saved. The file doesn’t exist. alert.
  • Reopen xcode and drag the file from your desktop to the folder in xcode project where you want it to be.
  • Build and the message should have gone.

Answered by Eager Logic on December 9, 2021

Make a zip of that project and delete the original project. After that force quit the system. Then start the system again and unzip the zipped project. Thank-You

Answered by shivi on December 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP