r/Xcode • • 7h ago

The iOS Weekly Brief: Issue #89

Thumbnail
iosweeklybrief.com
1 Upvotes

Siri AI limits, App Store Awards, new iOS beta, clean projects for AI agents, if and switch as expressions, safe area, SwiftUI sheets, SceneStorage, SwiftUI co-creators Q&A, a Git client for worktrees


r/Xcode • • 13h ago

My Mac mini lost 350 GB in a month. du couldn't see 280 GB of it. Here is what it was and how I found it

Thumbnail reddit.com
1 Upvotes

r/Xcode • • 23h ago

I made a tool to share Xcode build caches across git worktrees

3 Upvotes

I made this for personal use but I thought I'd make it available for others too.

Basically I have a 512GB Mac and I am often very close to running out of disk space on it. I switch worktrees a lot when I'm reviewing or testing changes and I end up with a separate DerivedData or .build folder for each one. I also spend a few minutes rebuilding the same deps whenever I build in a fresh worktree.

So I wrote a tool lets my worktrees share build caches, called Warm: https://github.com/theblixguy/warm-worktrees

The core idea here is to take advantage of a feature called block cloning on your filesystem. The tool uses it so copies of the build caches share disk space until their files change and only those changes occupy any additional disk space. If a dependency changes then Xcode can just fetch or rebuild what it needs and then reuse the rest.

Here's a graph to illustrate the improvements:

Now if you're using a different build system like Bazel or etc you probably don't need this tool as they already offer a shared cache feature, but I didn't want to change build systems nor want to make others do it.

This is also a general-purpose, cross-platform (macOS and Linux) tool so you can use it with Xcode, SwiftPM, etc or with other languages like Rust, TypeScript and etc so it's a single tool across all your various projects. It's highly customisable as well and can be easily integrated into your workflows, especially if you're using AI agents.

If you have any thoughts or feedback or if this tool helps you please let me know, thanks!


r/Xcode • • 2d ago

Our monthly CI bill went from $370 to $2,000.... we solved it by moving checks locally

0 Upvotes

When our 4 devs went from one coding agent each to five each on our iOS app, our GitHub Actions bill went from about $400 to about $2,050 a month.

20 agents × 5 pushes a day × ~15 macOS minutes per push is 33,000 minutes a month. Most of those runs failed on things a local build would have caught in a minute: a missing import, a broken test, a SwiftLint error.

The bill wasn't the only problem. Running 300 macOS jobs a day through 5 concurrent slots (capped by GH team plan). Averaged over an 8-hour day it's ~60% of our total macOS capacity, and agents don't push evenly, so we spent more watching queues.

So we moved the checks onto our Macs. That became HAR, an open-source CLI/MCP server:

- Each agent gets its own slot: a git worktree, plus its own ports and database for our local backend. Xcode keys DerivedData by project path, so parallel `xcodebuild` runs don't collide.

- Checks live in `.har/` as plain stages (ours are SwiftLint, `xcodebuild build` and unit tests). `har env verify` runs them in a fixed order inside the slot.

- A pass is tied to the tree hash that was checked, and a commit gate rejects anything unverified, so agents can't push their trial and error to CI.

Each slot acts like a local CI runner, limited by the Mac's cores and RAM instead of GitHub's job cap. Hosted CI still runs, but only on changes that already passed locally. Our bill now <$500 after two months. First month it reduced but we were tweaking the local checks and signatures.

Works with Claude Code, Cursor, Codex or any MCP agent. Apache 2.0.

github.com/os-factory/har
`npm i -g u/osfactory/har`


r/Xcode • • 4d ago

Can we all agree XCode is a buggy IDE?

13 Upvotes

r/Xcode • • 4d ago

Is macbook air m1 along xcode cloud a good long term ios development choice?

Thumbnail reddit.com
1 Upvotes

r/Xcode • • 5d ago

How much storage do your Xcode projects and development artifacts actually consume?

Thumbnail
gallery
5 Upvotes

Between DerivedData, simulators, archives, dependencies, and project build directories, it’s surprisingly easy for development storage to grow without noticing.

I’ve been building a native Mac storage utility called DiskLore that monitors storage changes and provides cleanup recommendations with explanations of what each item is.

I’m interested in how other developers approach this. Do you have a regular cleanup workflow, or do you generally leave everything alone until available space becomes a problem?


r/Xcode • • 5d ago

A place from which to remove the simulators

Post image
0 Upvotes

r/Xcode • • 6d ago

Built cloud iOS Simulators for coding agents — remote Mac builds + shareable browser links from one CLI command

1 Upvotes

r/Xcode • • 7d ago

The iOS Weekly Brief: Issue #88. macOS on iPad, iOS 27.3 beta 2, unknown enum cases, Xcode MCP vs xcodebuild, SwiftUI List internals, container values, drag and drop reordering in SwiftUI, iPhone Duo layouts, and Black Friday deals

Thumbnail
iosweeklybrief.com
1 Upvotes

r/Xcode • • 8d ago

Follow-up to my XcodeGen post: test and build setup for a Bluetooth menu bar app, now on the Mac App Store

Post image
1 Upvotes

Nine days ago I posted the project.yml lines that mattered for my menu bar app (widget extension, App Group, StoreKit config). Version 1.3 of Headphone Control is now on the Mac App Store, so here's the other half: the test and build setup that got it there.

  • Logic tests with no host app. The test target compiles the app sources (minus App.swift) and Shared/ directly instead of launching the app. A hosted run would start Bluetooth and talk to whatever headphones are nearby, which is the last thing you want in a test. Without a host the protocol tests are pure, fast and don't care what's paired.
  • What the WIDGET_EXTENSION flag ended up guarding. The widget compiles the same App Intents as the app. Inside #if WIDGET_EXTENSION the intents get isDiscoverable = false, and the AppShortcutsProvider only exists in the app target. Without that, Shortcuts listed every action twice.
  • A swiftc-only build script next to the project. It builds and ad-hoc signs the app with just the Command Line Tools and reads the version numbers out of project.yml, so the version lives in one place. Handy for quick local builds; releases still go through Xcode archives.
  • Minimal entitlements. App Sandbox, Bluetooth, user-selected files (exporting a device report) and the App Group. That's the whole list App Review saw.
  • Real-hardware check as the release gate. Nothing automated can pair headphones, so every release also gets a manual run on the physical headphones: connect, battery, ANC cycle, EQ presets, power-cycle reconnect.

And thanks to the commenter who suggested a clean-checkout job that runs xcodegen and checks the generated scheme. It's next on my list.

Honest scope: it's only tested on a real WH-1000XM5. Other Sony models and the other brand adaptors are experimental and off by default.

Two questions:

  1. Do you keep UI tests for MenuBarExtra apps, or is that not worth the flakiness?
  2. Has anyone shared one Shared/ folder between an app and a widget extension long term, or did you end up moving it into a local Swift package?

If you have an XM5 and a Mac, please try it: the Mac App Store has version 1.3, TestFlight has the newest builds. If you use it for a while, an honest App Store review (good or bad) helps a solo dev a lot.

App Store: https://apps.apple.com/app/apple-store/id6833635897?pt=128665136&ct=reddit-xcode&mt=8
TestFlight: https://testflight.apple.com/join/HZVTxTff

I'm the developer, ask me anything.


r/Xcode • • 8d ago

Swift package for PCC

1 Upvotes

I decided to build a swift package for using Private cloud compute and Apple's local models, I found it difficult to find the correct places to use them, and there was nothing out there to do it for me automatically, so I built my own!

Its still pretty early, it works on calibration of latency, and adjusts the model used based on request latency, it continuously re-calibrates the more its used based on the users device

Its fully open source, so feel free to check it out!


r/Xcode • • 9d ago

I can finally control Xcode's storage.

0 Upvotes

r/Xcode • • 9d ago

Finding Hacking with swiftUI hard to learn. Help needed!

Thumbnail reddit.com
1 Upvotes

r/Xcode • • 9d ago

Deleting Xcode junk

Post image
0 Upvotes

r/Xcode • • 12d ago

Unable to login my Console Account.

Thumbnail
reddit.com
1 Upvotes

r/Xcode • • 11d ago

Do I really need a new Mac just to put an app on the App Store?

0 Upvotes

So I develop on Windows, and our app is React + Capacitor and Android is done, but for iPhone the only Mac we've got is a 2015 MacBook Pro intel. Apple's newer Xcode won't run on it.

Someone told me I can build in the cloud with GitHub Actions and send it to TestFlight. Haven't tried it yet. Is that actually reliable, or is there any other way around this?

Any advice would be very helpful please


r/Xcode • • 13d ago

Running macOS 26 – Is There Any Way to Get Xcode 27 or Its Simulator?

6 Upvotes

I'm running macOS 26 on an Intel Mac and currently using Xcode Cloud to build with the latest Xcode version.

Is there any way to install or access Xcode 27, or at least its iOS Simulator, locally?

I understand Xcode Cloud is an option, and I'm already using it, but having a local simulator would make development and testing much smoother.

Has anyone found a workaround or alternative to run the newer simulator on macOS 26?


r/Xcode • • 14d ago

Recordings of the GNUstep online meeting of 2026-11-14 are online

Thumbnail
youtube.com
1 Upvotes

r/Xcode • • 14d ago

The iOS Weekly Brief: Issue #87. App Store Award, migrating to Swift Testing, context menus in SwiftUI, ReservedRegion for iPhone Duo, senior iOS interview, scroll position, scroll-driven effects, and Vision with Foundation Models.

Thumbnail
iosweeklybrief.com
1 Upvotes

r/Xcode • • 15d ago

I built Snitch, an open-source in-app inspector for network requests and analytics events (PostHog, AppsFlyer)

Thumbnail
reddit.com
1 Upvotes

r/Xcode • • 17d ago

XcodeGen setup for a sandboxed Mac app + widget extension + StoreKit config: the lines that actually matter

Post image
1 Upvotes

I keep my Mac app's .xcodeproj out of git and generate it with XcodeGen. The app is a small menu bar utility with a WidgetKit extension, App Intents and a tip jar, and almost every "why doesn't this work" moment came down to a handful of lines in project.yml. Sharing in case it saves someone an evening:

  1. StoreKit config without bundling it. - path: Configuration.storekit with buildPhase: none keeps the file in the project but out of Copy Bundle Resources, and scheme: storeKitConfiguration: Configuration.storekit wires it into the generated scheme, so local IAP testing works right after xcodegen generate.
  2. Embed + sign the extension from the app target. dependencies: - target: HeadphoneWidgets, embed: true, codeSign: true. An embedded appex that isn't signed with the same team simply won't load, and the failure is quiet.
  3. Runpath for the extension. LD_RUNPATH_SEARCH_PATHS: $(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks. The second entry is what lets an appex inside Contents/PlugIns find the host app's frameworks.
  4. One App Group, defined once. APP_GROUP: $(TeamIdentifierPrefix)com.example.app in base settings, then $(APP_GROUP) in both entitlements files and in Info.plist (AppGroupIdentifier). Shared code reads it from the bundle and falls back if the variable didn't expand, so a misconfigured build fails visibly instead of silently writing to .standard defaults.
  5. Compile shared code into both targets, branch with a flag. A Shared/ folder is a source path in both targets, and the extension gets SWIFT_ACTIVE_COMPILATION_CONDITIONS: $(inherited) WIDGET_EXTENSION for the few places that must differ.

Also worth it: ENABLE_APP_SANDBOX, ENABLE_HARDENED_RUNTIME and DEAD_CODE_STRIPPING in base settings so every target inherits them.

Anyone else generating projects with XcodeGen or Tuist for macOS apps with extensions? Curious whether you hit anything with Control Center controls (macOS 26) that needed extra config.


r/Xcode • • 17d ago

Xcode detects my iPhone via devicectl but won’t show it as a run destination

Thumbnail
gallery
0 Upvotes

I’m trying to deploy a SwiftUI app to my physical iPhone, but Xcode only shows simulators.
Setup:
Xcode 27.2
iPhone18,2 running iOS 26.6
USB-C connection
Developer Mode enabled
Deployment target: iOS 26.0
Finder and macOS System Information recognize the iPhone.
Running xcrun devicectl list devices also shows:
State: available
Reality: physical
However, xcrun devicectl device info details --device <UDID> returns:
Error: The device must be paired before it can be connected.

Device State: disconnected
Pairing State: unpaired
Transport Type: wired
The iPhone doesn’t appear in Xcode’s Device Hub, run destinations, or Incompatible devices list.
Already tried:
Reconnecting USB-C and restarting Xcode
Confirming Developer Mode is enabled
Checking xcode-select -p
Lowering the deployment target to iOS 26.0
Verifying Supported Destinations and scheme settings
I also checked devicectl device pairings, but that appears to manage iPhone–Apple Watch pairing rather than Mac–iPhone pairing.
Has anyone encountered this? How can I force or reset CoreDevice pairing without reinstalling Xcode or resetting my iPhone?
Any help would be appreciated!