Storyboard XML is unstable
| Originator: | tewha | ||
| Number: | rdar://12566174 | Date Originated: | 24-Oct-2012 10:47 AM |
| Status: | Duplicate/12308164 | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Opening a storyboard, even just to look at it, is often enough to mutate its XML, adding or removing outlets seemingly at random. Steps to Reproduce: 1. Open a storyboard. 2. It's probably dirty; save. Expected Results: Storyboard XML should be stable, changing only if a change is made. Actual Results: Storyboard XML often is mutated. This would be acceptable if it was only mutated once, but it is mutated back and forth depending on unknown factors (opening and closing source files in the project seems to be one of them). My intentional changes are lost in a sea of churn. Regression: Notes: I am not complaining about mutation for new versions of Xcode, new versions of OS X, or other changes. I am referring to mutation that often occurs several times per day. I am not the only one experiencing this, see: https://devforums.apple.com/thread/170840?tstart=45
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
This still happens on 4.6 unfortunately.
So here's my dupe, which I should have done before 4.6 shipped: rdar://13098881
I experience this constantly
It's a nightmare for large teams working in a distributed manner. Merges are terrible!
Horrible workaround
For what it's worth, I've found a workaround that almost always works.
Before opening a storyboard, close every single source file in the project.
This will mutate the storyboard in a particular way; thereafter, as long as you close every single source file in the project before you open the storyboard EVERY SINGLE DAMN TIME, the XML is mostly stable. This workaround was based on my observation that the mutated file was "always" a file I had open.
If you follow this procedure, instead of mutating every time you select it you'll get mutation only 1 time in 50 (or less). Generally, if the mutation is this random churn, I revert the change using my source control system, close and re-open the project, and try again. (Edit: Actually, I think I quit/restart Xcode now. Because it's easier.)
Obviously, this is a horrible workaround.
This workaround does NOT do anything about OSX or Xcode upgrades, and addresses only the random mutation.