Is there a way in Xcode 14.x to save my editor layout?

105 views Asked by At

I have moved all my "inner" windows of Xcode 14.x so that they are in a particular area and sized so they are most usable to me (see image).

The default settings make the Code Editor far too narrow and make the preview far too wide.

Xcode 14.x layout

Now, I'd like to save these settings so that the next time I open a project all of the "inner" windows are opened in the same locations with the same sizes on my screen.

Is there any way to get Xcode to open my iOS SwiftUI projects so the screens are set up the same every time?

What I've Tried

  1. Setting everything up, saving all files in project, exiting Xcode and opening again. My layout is not saved.
  2. Examining Xcode...Settings... (see snapshot below) for any setting that would save these options.
  3. Checked Editor...Layout... settings hoping there was something there (see 2nd image below)

Xcode...Settings

Editor...Layout...

1

There are 1 answers

1
Aditya On

You can use third-party apps like Moom,Stay,etc.. to save and restore window layouts across applications, including Xcode Or You can Use AppleScript to resize window programatically.

Here is AppleScript Prototype :

tell application "Xcode"
activate
set bounds of window "Code Editor" of project "YourProjectName" to {value, value, value,value} -- Adjust the values as needed
set bounds of window "Preview" of project "YourProjectName" to {value, value, value,value } -- Adjust the values as needed end tell