Teaching Xcode New Tricks

What will they think of next?

Those Apple engineers must be writing lots of SwiftUI code.... because your always needing to embed the existing chunck of code in yet-another containner like a ScrollView() or some such widget.

When you have a complex bit of code it can be hard to find the correct place for that closing brace that you must put in - just the perfect spot. So someone at Apple taught the old Xcode a new trick... the { (left bracket trick). It doesn't have a name - yet. But heres how it's done.


When editing and you want to embed a block of code in a new SwiftUI container like VStack…


First collapse the code you want to embed… then highlight the collapsed block and type your left bracket first then the container line of code “ScrollView {“



The trick is the collapse of the VStack and then highlight and Shift-{

You will get the VStack embedded in a block {…} and the cursor ready to type the “ScrollView()” code.

Xcode Cloud

I downloaded Xcode 14.1 and it has a nice new Xcode Cloud interface. Product menu - way down at the bottom.

I've been having some sort of configuration issue in the Web App Store - cannot save a new Workflow. So I cannot add my UnitTest to the CI environment. Builds are working just fine.

Now with the Xcode interface a new Workflow was created and persisted and it's working - Unit Test are running in the Cloud!

That is a great - One more Thing!