Do not require Xcode 8 to quit when synchronizing changes into Xamarin Studio
As title suggests
It turned out that it was possible to restore the old Xcode 7 behavior at least in the latest final versions of Xcode 8, so this precise request will be resolved in the upcoming Xamarin Studio 6.2 release (see Bug 44285, Comment 20: https://bugzilla.xamarin.com/show_bug.cgi?id=44285#c20). Xamarin will be continuing to evaluate the best set of options it can provide to users moving forward to provide flexibility and efficiency in editing interface builder documents. Many thanks to users who contributed ideas on this topic!
Oren Goldfinger commented
I'm a bit confused on the synchronization problem. Are you saying with Xcode 7 changes made in Xamarin were synced back to Xcode automatically? That never seemed to work for me. If it helps this is how I was working with Xamarin:
For any Xib changes, I would:
1) Close Xcode
2) Manually add all my outlets and actions into the designer file
3) Open Xcode to layout and hook everything up
4) Bring Xamarin back into focus which "synced" changes so that GitHub would see those files as modified.
If I forgot to add an outlet in the designer, I would simply repeat the steps 1-4. This flow worked infinitely better than dealing with Xamarin's designer, which never worked for me at all. It'd be awesome if I can add an outlet while Xcode is open and have it pick up automatically in Xcode, but that never worked and I understand that could be complex to support.
So if it helps, I definitely do not need changes made in Xamarin to sync to Xcode. I also don't need Xamarin to know about the XIB changes since I never open Xibs in Xamarin anyway. I only need changes made in Xcode to be picked up by source control as being modified.
If Xamarin can build a designer that works as well as Xcode than great. But right now it's so far from that I was half-expecting Xamarin to drop their support for Xibs and only rely on Xcode...not the other way around.
Please fix this asap! It's an incredible loss of productivity to have to constantly reopen Xcode just to have my XIB file show up as modified. It's a huge disappointment to hear this was done as designed and a better solution wasn't found before releasing. (This sounds more like big-brother Microsoft making the decision than the awesome Xamarin team)
And then there is the Xamarin.Mac development. We need Xcode sync there as we have no alternative UI designer for developing Mac software and creating the UI "by hand" in 2016, is not an option...
Wim Van Renterghem commented
I would like to at least have the possibility to edit xibs and storyboards in Xcode (and link them to the .h files) without any synchronization from Xamarin to Xcode.
Then you could force Xcode to close (or crash) each time we make a breaking change in Xamarin (adding Register attributes or outlets).
This would allow me to keep my current flow (create xibs & register views & viewcontrollers in code, open Xcode & design them there), while still not having any synchronization from Xamarin to Xcode.
An other way you could try this is using Alcatraz ( http://alcatraz.io ), but I don't have any experience using that, so I can't say what you can and can't do with it.
Brendan Zagaeski commented
## Some background information on this UserVoice suggestion
The behavior of the Xamarin Studio synchronization for editing interface builder files with Xcode Interface Builder has unfortunately changed for Xcode 8 due to changes in Xcode. With Xcode 7.3 and earlier, Xamarin Studio could leave Xcode open when it performed the synchronization steps. (In fact, leaving Xcode open during the sync did cause certain problems, but at least it didn't usually cause Xcode to _crash_.) In contrast, starting with Xcode 8, if Xamarin Studio tries to use that same approach, it _does_ cause Xcode 8 to crash. So rather than forcibly crashing Xcode, Xamarin Studio tells Xcode to quit.
To give a bit more historical context, the Xcode sync has always been quite problematic. Apple does not allow third parties to extend Xcode, so the only ways Xamarin has available to interop with it are:
(a) Modifying files on the file system directly and then _hoping_ that Xcode decides to pick up those changes correctly on the fly. (And Xcode does _not_ always handle those changes as desired. The crashing behavior of Xcode 8 is an example.)
(b) Sending commands to Xcode via AppleScript. (This option is unfortunately very race-prone.)
So fundamentally, Xcode makes it near-impossible to do this synchronization _well_.
Taken together, these considerations unfortunately suggest that providing a way to keep Xcode 8 open during the synchronization without causing it to crash might not be technically possible. The most complete solution to these complications would be for Xamarin to further enhance its own iOS Designer to be able to obsolete the Xcode synchronization feature at some point farther in the future. But Xamarin is aware that currently the Xcode Interface Builder is still strongly preferred by a number of users for certain workflows.
One goal of this UserVoice suggestion can be to tally user interest about the current technical limitation that requires Xamarin Studio to close Xcode 8 between synchronizations. Recording the tally here on Xamarin's UserVoice alongside other ideas and requests will help provide a useful frame of reference.
## Example from a user of how the new quit/reopen behavior for Xcode 8 affects the worfklow compared to Xcode 7
"If I forget something, then I have to go through the process again (and it's not quick, with upwards of 60 view controllers to load in Xcode)."
## Some very small brainstorming thoughts just to stir the conversation a little
- One little question that crossed my mind was whether there might be a way to remove (or optionally disable) certain automated aspects of the integration to reduce the number of times that Xcode needs to be closed. As one (perhaps silly) example, it seems like it would be possible to allow users to temporarily toggle to a strict one-way sync from Xcode to Xamarin Studio (and _not_ back the other way) that wouldn't need to close Xcode. Maybe that could be useful in scenarios where users aren't adding, removing, or renaming C# classes between syncs?
- Maybe some users would accept certain trade-offs to allow more use of AppleScript? For example, maybe disallowing all user input for the duration of the synchronization would provide more flexibility.
Xamarin Support Team