# Xcode 16

Published articles for Xcode 16.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Why Legacy Xcode Projects May Benefit from Replacing Groups with Folders

DevFeed: [Why Legacy Xcode Projects May Benefit from Replacing Groups with Folders](<https://devfeed.tech/articles/stop-using-groups-in-xcode-29461.md>)

Original publisher: [Read original article](<https://medium.com/mobile-app-development-publication/stop-using-groups-in-xcode-9759abd85837?source=rss----f9c208bdbb09---4>)

Author: Elye - A Dev By Grace

Published: 2025-12-07T13:07:57Z

Content type: article

Language: en

Sources: [Mobile App Development Publication - Medium](<https://devfeed.tech/sources/mobile-app-development-publication-medium.md>)

Topics: [Xcode](<https://devfeed.tech/topics/xcode.md>), [legacy](<https://devfeed.tech/topics/legacy.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [coding](<https://devfeed.tech/tags/coding.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ios-development](<https://devfeed.tech/tags/ios-development.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [structure](<https://devfeed.tech/tags/structure.md>), [xcode](<https://devfeed.tech/tags/xcode.md>), [xcode-16](<https://devfeed.tech/tags/xcode-16.md>)

### AI overview

This article explains how Xcode project file organization differs between Groups and Folders. It notes that projects created before Xcode 16 use Groups by default, while new projects use Folders, and introduces reasons for considering Folders in legacy projects.

### Source excerpt

Seven Reasons Folders Are Better -- Especially for Legacy Projects Continue reading on Mobile App Development Publication "

## Format Swift with a Git Commit Hook

DevFeed: [Format Swift with a Git Commit Hook](<https://devfeed.tech/articles/format-swift-with-a-git-commit-hook-21085.md>)

Original publisher: [Read original article](<https://useyourloaf.com/blog/format-swift-with-a-git-commit-hook/>)

Author: Keith Harrison

Published: 2025-11-24T10:29:58Z

Content type: tutorial

Language: en

Sources: [K. Harrison](<https://devfeed.tech/sources/k-harrison.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Git](<https://devfeed.tech/topics/git.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Development](<https://devfeed.tech/topics/development.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [auto-layout](<https://devfeed.tech/tags/auto-layout.md>), [bash](<https://devfeed.tech/tags/bash.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [developer](<https://devfeed.tech/tags/developer.md>), [development](<https://devfeed.tech/tags/development.md>), [git](<https://devfeed.tech/tags/git.md>), [git-commit](<https://devfeed.tech/tags/git-commit.md>), [ios](<https://devfeed.tech/tags/ios.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [swift](<https://devfeed.tech/tags/swift.md>), [wwdc](<https://devfeed.tech/tags/wwdc.md>), [xcode](<https://devfeed.tech/tags/xcode.md>), [xcode-16](<https://devfeed.tech/tags/xcode-16.md>)

### AI overview

This tutorial explains how to format Swift code automatically with swift-format and a Git pre-commit hook. It covers Xcode 16's bundled formatter, .swift-format configuration files, a Bash hook that formats staged Swift files, hook installation, and bypassing the hook when needed.

### Source excerpt

How do you automatically format your Swift code every time you commit it to your Git repository? Swift Format There are several Swift formatting tools. Xcode 16 shipped with swift-format included in the toolchain: $ xcrun --find swift-format /Applications/Xcode.app/Contents/Developer/Toolchains/ XcodeDefault.xctoolchain/usr/bin/swift-format To run the formatter: $ swift format MyFile.swift Note: This runs the swift-format bundled with the active Xcode development directory (beta or release). Configuring swift-format The Xcode settings let you configure various formatting options including indentation but I prefer to use an external configuration file for swift-format. By default, swift-format looks for a configuration file named .swift-format in the same directory as the files you are formatting. If there isn't one it looks in each successive parent directory. If it doesn't find a configuration file it uses a default configuration. You can dump the default configuration to get started: $ swift format dump-configuration > swift-format Modify the configuration file to meet your own code style: { "fileScopedDeclarationPrivacy" : { "accessLevel" : "private" }, "indentConditionalCompilationBlocks" : true, "indentSwitchCaseLabels" : false, "indentation" : { ... I keep my default configuration file in my base Developer directory: $ mv swift-format ~\Developer\.swift-format When needed, I can override the defaults by placing a modified configuration file in the project-specific root directory. Note: Don't forget to prefix the configuration file with a . Git Commit Hooks Git Hooks are a way to run custom scripts when different Git actions occur. A pre-commit hook runs when you commit changes to a repository. Here's the pre-commit script I'm using to run swift-format: #!/bin/bash GIT=/usr/bin/git GREP=/usr/bin/grep SWIFT=/usr/bin/swift # Staged (cached) added/copied/modified/renamed files FILES=$($GIT diff --cached --name-only --diff-filter=ACMR | $GREP '\.swift$') # Exit ear

## Linting a Swift package with swift-format

DevFeed: [Linting a Swift package with swift-format](<https://devfeed.tech/articles/linting-a-swift-package-with-swift-format-24550.md>)

Original publisher: [Read original article](<https://medium.com/snapp-mobile/linting-a-swift-package-with-swift-format-a887b4e95a1e?source=rss----bcd96e620b02---4>)

Author: Oleksii Kolomiiets

Published: 2025-01-27T08:59:47Z

Content type: tutorial

Language: en

Sources: [Snapp Mobile - Medium](<https://devfeed.tech/sources/snapp-mobile-medium.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Xcode 16](<https://devfeed.tech/topics/xcode-16.md>), [developer tooling](<https://devfeed.tech/topics/developer-tooling.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [development-tools](<https://devfeed.tech/tags/development-tools.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [lint](<https://devfeed.tech/tags/lint.md>), [packages](<https://devfeed.tech/tags/packages.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-package-manager](<https://devfeed.tech/tags/swift-package-manager.md>), [xcode-16](<https://devfeed.tech/tags/xcode-16.md>)

### AI overview

This tutorial explains how to enable linting for a Swift package during its build process with the built-in swift-format tool included in the Xcode 16 toolchain. It covers creating a package, adding a package plugin, attaching the plugin to targets, and displaying a test warning during the build.

### Source excerpt

Linting your code is handy and effective way to keep your team's code style in shape. Nowadays it's hard to imagine a project without functionality that alerts developers with warnings or errors about issues in the code. It could be done with a simple script added to build phases. But what can you do when you don't have one? Packages are excluded from this option, but they still need to be maintained. Or at the very least, you'll feel much better knowing your package code is clean and consistent, and no one can make it messy without receiving a warning. This article explains how to enable linting for a package during its build process, using only the built-in swift-format tool -- no external libraries required. Preparation With Xcode 16, swift-format is included as part of the Xcode toolchain, eliminating the need for external libraries and making Swift file formatting more convenient. For more information, refer to the Getting swift-format section. 1. Create a package Launch Xcode and select File > New > Package from the menu. Chose Library and add the name to the package. 2. Add Plugin Package plugin is: Swift script that can be run as part of your buildA package could have plugins as extra, or be all about pluginsPackage plugins are available only within packageGeneral plugins can be made available to the outsideLets you access development tools on your machine More information about package plugins can be found in the Meet Swift Package plugins article. Start by creating a dedicated folder for all potential plugins, including the one you're currently working on. Ctrl + click on your package name in Xcode and select "New Folder" or use any other method to create a folder in the root of your project. Next, create a folder specifically for your plugin's logic. Since it will lint the package code using swift-format , the name SwiftFormatPlugin was chosen. By the end, the structure would look like this Now, let's add some content to plugin file import Foundation impor