You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Xcode 4.2 not ask to save changes

Why xcode 4.2 will not ask: "to save changes or not", for example when I delete \ altering anything in the StoryBoard and elsewhere? Wen I close xcode, it's just save any changes I did, but I do not want to do this. That's bad, I can do any modifications in my project and then just hit close button and it's will be saved without any warning messages, but if i do not want to save?

Xcode 4.2-OTHER, Mac OS X (10.7.1)

Posted on Jan 15, 2012 9:13 AM

Reply
28 replies

Nov 29, 2012 8:25 PM in response to KAMIKAZE[UA]

So, shortly after I posted my last message, I noticed it only partially worked (not when closing Xcode). Sorry about that.


The real solution for me was to change it globally (with 10.8) which is what I really wanted anyways:


1) Open the Settings app.

2) Open the General panel.

3) Check "Ask to keep changes when closing documents"


Hope this helps!

Dec 19, 2012 11:26 PM in response to D.McG.

I noticed that even after you check the "Ask to keep changes when closing documents" the file modified date has changed right after you click the close button and reverted back after you clicked the revert changes. I have proven this by canceling my editing on my Dropbox' file, it create many revisions for something that supposed to not changed.


This behavior is unacceptable and somewhat irritating. XCode (and maybe all other Apple app) actually & aggressively save the changes and only revert it back if you click the Revert Changes button. Clicking Cancel button also did not work as it should. It save and close the window just like you click Save button.


Why not just simply don't touch the file unless user hit the save button like it used to.

Why Mr. Craig Federigh, why?

Jul 20, 2013 1:12 PM in response to D.McG.

The suggest solution isn't working for me.


I have selected "Ask to keep changes when closing documents" in System Preferences / General.


I open an Xcode project, I make a change, I build and run to see the effect, I close the project (not wanting this temporary change to save), and I am not asked whether to save my changes. If I reopen the project, I see the change was saved.


If I make a change and do not build/run, I *am* asked whether I want to save changes upon closing the project.

Jul 29, 2013 6:24 PM in response to startswithj

Building requires the file to be saved. You cannot build the project with the changes without saving first, so Xcode implicitly saves your files when you click build (think of it as Save and Build). So essentially there were no changes to save upon closing the project; they were saved already.


It may not be what you want, but this is the current behavior. Just be aware of it.

Jul 29, 2013 7:28 PM in response to Stokestack

This is code work....where revisions are routinely tracked (you do use source control of some ilk, right?) and it's assumed you want to do what you do.


This isn't PaintWorks Deluxe Home Edition Pro, where an application insists on asking if you're really sure about being sure you're sure that you're sure you want to do anything ever without a minder making sure you really want what you just said you want...for sure.

Jul 29, 2013 9:20 PM in response to K T

That makes no sense, because saving is the safer option. It only needs to ask once (especially if, as you suggest, you have old revisions in source control).


But the source-control argument is flawed, if for no other reason than that its integration in Xcode is wholly unreliable. Anyone who relies on its GUI for source-control operations or status is really asking for trouble. And this is with simple projects in a single-user environment.


Second, it is a cross-platform standard in applications of all types and expertise levels to ask whether you want to save unsaved changes when you try to quit the app without doing so. Continuing to try to find excuses for not doing so is infantile and pointless.

Jul 30, 2013 8:04 AM in response to K T

K T wrote:


…This isn't PaintWorks Deluxe Home Edition Pro…

…You still seem to be reacting as if you're using a broad market consumer-level application…

…The sooner the light goes on that to use it means to have your feet under you…


Dear @KT, please note: https://discussions.apple.com/static/apple/tutorial/etiquette.html


Specifically:

Be polite, constructive, and stay on topic.


Cheers.

Aug 4, 2013 8:03 AM in response to Stokestack

If you close the project without building it, and followed my previous answer to the original poster's question of enabling "Ask to keep changes when closing documents" in System Preferences, then you will be asked to save.


My last post was in regard to the implicit save if one starts a build. If you start a build, it will automatically save your changes; regardless of the system preference. Desirable or not, that is the current functionality. Building the code currently in the editor requires the saving; since other background processes are involved in building.

Xcode 4.2 not ask to save changes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.