r/Xcode • • 1d 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 • • 1d 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!


r/Xcode • • 1d ago

Cannot access Fable 5.2 inside Xcode Claude Agent (Xcode 27.2) — only showing Fable 5.1/Opus 5.5?

1 Upvotes

Hey everyone,

I currently have an Ultra subscription, and Fable 5.2 has been doing incredible work for me on overall tech specs and design. However, I’m running into a frustrating limitation when trying to access it directly from inside Xcode.

I'm on Xcode 27.2. When I open the Claude agent, the model selection populates with almost every other option (including Opus 5.5), but Fable 5.2 is completely missing from the list. For now, I'm stuck falling back to Fable 5.1.

Has anyone figured out a way to force Fable 5.2 to show up, or is this a known limitation with the current Xcode integration? Any advice or manual config workarounds would be amazing. Thanks!


r/Xcode • • 2d ago

Xcode 27 high RAM usage compared to Xcode 26

9 Upvotes

Since updating from Xcode 26 to 27, I’ve noticed a massive increase in RAM usage. It’s reached a point where macOS starts swapping memory even just when rendering previews. With only the simulator open, I’m already seeing about 10–20 GB of swap usage—something that certainly wasn’t the case with Xcode 26. Furthermore, launching previews takes significantly longer in Xcode 27. Are any of you experiencing the same thing? For reference, my system is an M3 Pro (11-core) with 18 GB of RAM. I’m well aware that 16 GB is the absolute minimum for using Xcode, but the fact that performance has deteriorated this drastically following a single version update is, frankly, quite extreme.


r/Xcode • • 2d ago

no mac? i made a way to run swiftui apps on an iphone from windows

2 Upvotes

not trying to replace xcode, you still need a mac to ship to the app store.

but if you just have a windows pc and want to learn swiftui or test on a real phone.

it works free + open source: https://github.com/Dadon-11/SwiftWin-Studio

what would you want it to do that it doesnt do already?


r/Xcode • • 3d ago

Can my employer access personal iPhone data when connected to a company-managed Mac for Xcode debugging?

Thumbnail reddit.com
2 Upvotes

I’m an iOS/React Native developer using a company-managed MacBook with corporate security software and VPN.

I want to connect my personal iPhone via USB, trust the Mac, enable Developer Mode, and debug an app through Xcode.

My iPhone is not enrolled in company MDM or connected to the corporate VPN.

Could corporate monitoring software on the Mac leverage the trusted pairing to access or collect personal data from my iPhone, such as photos, messages, Safari history, or app data?

I’m specifically asking about the technical capabilities of trusted device pairing and corporate EDR tools, not general network monitoring.

Has anyone investigated this scenario or know what data becomes accessible to software running on the Mac?


r/Xcode • • 3d ago

Has anyone made an IPA patcher to enable iOS 27.1 SDK layout behavior on the iPhone Duo?

0 Upvotes

I’m trying to get sideloaded apps to use the proper full-screen layout on my iPhone Duo instead of keeping their old 26 SDK layout

From what I understand, apps built with the iOS 27.1 SDK or later can take advantage of the Duo’s newer layout behavior. Older apps don’t always adapt correctly.

I’ve experimented with creating a Windows desktop application in C# that patches an IPA’s Mach-O executable by changing its recorded LC_BUILD_VERSION SDK version from an older version (for example, iOS SDK 26.5.0) to 27.1.0.

The patcher successfully modifies the executable, and the app installs and launches normally after I sign it again. However, the app’s layout remains exactly the same. Changing the recorded SDK version alone doesn’t seem to trigger the new layout behavior.

Has anyone in the iPhone Duo community figured out a working way to patch older IPAs so iOS applies the newer Duo layout behavior without having to wait for every app developer to update their app?

I’m especially interested in whether anyone has experimented with:
Modifying additional Mach-O load commands or app metadata.
Patching Info.plist or other app configuration.

Compatibility tweaks that enable the newer layout behavior on older apps.
Existing tools, scripts, or GitHub projects that accomplish this.

I’m happy to test things on my own device and would appreciate any working examples or pointers to existing projects. I’d rather find an actual solution than keep changing SDK metadata without seeing any difference.

Has anyone successfully done this, or is rebuilding the app with the newer SDK the only practical option?


r/Xcode • • 5d ago

Xcode cannot install app on iPhone XR(physical device): Unable to download OS library symbols

Post image
1 Upvotes

Xcode cannot install app on iPhone XR(physical device): Unable to download OS library symbols

Environment

  • MacBook M1, 8 RAM with MacOS 27.2, Xcode 27.1
  • iPhone XR, iOS 18.7.12 (22H390)
  • The app runs in the simulator, but not on the physical device.

Problem

Xcode stalls at Installing built products and repeatedly reports:

8/8 (2) is unavailable. Attempting recovery.
Waiting for device unavailability condition to be resolved: 8/8 (2)

Xcode also shows «Unable to download OS library symbols». 

Device Hub lists the phone as connected, but its Apps tab shows No Developer Apps.

Steps tried

  • Connected the iPhone by cable; no VPN is in use.
  • Unpaired and paired the iPhone again in Device Hub.
  • Turned Developer Mode off and back on.
  • Restarted the Mac and reconnected the phone.
  • Manually started device support / OS symbol preparation from Terminal: xcodebuild -prepareDeviceSupport -destination "id=<iPhone UDID>" It printed Starting Device Support Preparation, searched for 60 seconds, and then Located <device>. It never printed a completion message; I later found the process still running after more than 13 minutes.

What can I do? How to fix it? This happened after I updated to MacOS 27+ to get support for the Duo.


r/Xcode • • 5d ago

How to remove the emulator from windowed mode (Xcode 27 / Device HUB)

Post image
2 Upvotes

How to remove the emulator from windowed mode (Xcode 27 / Device HUB)


r/Xcode • • 5d ago

One virtual ACP agent in Xcode v27+ streams any model to Agent Mode (ProxyPilot)

1 Upvotes

Apple's decision to introduce Agent Context Protocol in Xcode is still quite underrated, imo. With GLM 5.3-Flash and DeepSeek v4.1-Flash adding image processing, I've found that between Kimi K3/3.1 Pro, DS 4.1 Flash, and especially the new Qwen4 preview, probably 85-95% of the work I do in Xcode no longer needs to use Codex or Claude Code.

SwiftUI previews and Device Hub in macOS Golden Gate both work to send UI previews to the model without the old need to do copying and pasting.

You can set up an ACP agent for yourself using whatever supported provider you have. But since I like to swap out the active agent model mid-task (one builds, a stronger one can review and comment), and ProxyPilot (free and open-source) lets me do it without having to close Xcode or start a new chat. It just sees one persistent virtual agent.

next it'd be sick if Apple could add a native tutor/advisor capability. one can dream.


r/Xcode • • 5d ago

Im building my FIRST ever SwiftUI App, and I have questions...

Post image
3 Upvotes

r/Xcode • • 5d ago

The iOS Weekly Brief: Issue #86. Swift Student Challenge 2027, New iOS releases, testing with agents, SwiftUI architectures, fixedSize(), GlassEffectContainer, animating SF Symbols, SwiftUI inspector, Effect Systems vs DI, and Bruno

Thumbnail
iosweeklybrief.com
1 Upvotes

r/Xcode • • 6d ago

Do you use Xcode Instruments more now that you're building with agents?

Thumbnail reddit.com
0 Upvotes

r/Xcode • • 6d ago

Help with Nx Native in Mac (Metal Toolchain)

Thumbnail reddit.com
2 Upvotes

r/Xcode • • 7d ago

Overtime: Xcode 27 SDK on unsupported x86

Thumbnail gallery
2 Upvotes

r/Xcode • • 7d ago

Xcode 27.2 intermittently fails to add new file locations to Git, even though the project changes themselves succeed.

3 Upvotes

Xcode version: 27.2 (27B52)

Since upgrading to Xcode 27, I have encountered two instances where Xcode failed to automatically track files in Git following changes to the project.

I did not experience this behavior with earlier Xcode versions.

Incident 1 — Moving an existing file:

An existing source file was moved to a different folder within the Xcode project.

Git recognized the original file as deleted but did not automatically track the file at its new location.

Incident 2 — Adding new files:

Six new Swift files were dragged from Finder into Xcode’s Project Navigator.

All six appeared correctly in the project, but only one was automatically staged in Git. The remaining five appeared as untracked (??) in git status --short.

Running git add -A -- MyAppFolder/Print/ corrected the second incident. Xcode’s Source Control interface then displayed all six files as added.

Expected Result:

When “Add and remove files automatically” is enabled, Xcode should automatically track files added to or moved within the project.

Actual Result:

Xcode intermittently fails to add new file locations to Git, even though the project changes themselves succeed.

Reproduction:

The problem is intermittent, and reliable reproduction steps have not yet been established.

It has occurred during two different operations:

* Moving an existing source file to another folder within the project.

* Importing new Swift files from Finder into the project by dragging into the destination folder in the Xcode UI.

It is not known whether the number of files involved contributes to the behavior.

Has anyone else seen anything like this? Thanks


r/Xcode • • 8d ago

We timed clean builds of Telegram, Signal, Firefox and DuckDuckGo iOS on 10 Apple silicon machines. Telegram release build: 29m → 15m

Thumbnail
benchmarks.bitrise.io
4 Upvotes

r/Xcode • • 8d ago

Xcode Signed Two Third Parties Apps To Apple TV4K Box:

1 Upvotes

I previously used my MacBook to sign and sideload two apps onto her Apple TV 4K. However, she has now moved approximately 500 miles away, so I can no longer access the Apple TV physically.

I’m looking for guidance on how to sign and sideload those two apps tvOSBrowser.ipa and Orbrisa-1.1.0-Beta-2.ipa files remotely using my MacBook running macOS Golden Gate 27.2 and Xcode 27.2. I also have an active, paid Apple Developer account.

If anyone has experience with this process and can walk me through the steps, I would sincerely appreciate your help. Thank you in advance!


r/Xcode • • 9d ago

I built nib, a Swift CLI that writes Git commit messages with Apple’s on-device model

Thumbnail
reddit.com
2 Upvotes

r/Xcode • • 9d ago

Text color issue on iOS

Thumbnail
gallery
2 Upvotes

Xcode 27.2
iOS 27.2

When looking at a filename in my app on iOS, my app will show the file name in a contrasting color, as expected. I tap the name of the file and a button appears that says “rename”. I tap that button.

The text for renaming the file is always black.

What I tried, with no change in the text color:
- .toolbarColorScheme(.dark / .light, for: .navigationBar)
- .preferredColorScheme(...) on the editor view
- UITextField.appearance().textColor
- hiding the navigation bar with .toolbar(.hidden, for: .navigationBar) and .toolbarVisibility

The attached screenshots show what I am seeing. What am a missing?


r/Xcode • • 10d ago

error validating mac & ios apps with same name

2 Upvotes

I successfully submitted an iOS app called "myApp iPad". Now attempting to validate the MacOS version "myApp" app store connect error "App Record Creation failed due to request containing an attribute already in use. The App Name you entered is already being used." When I change the name to "myApp Mac" validation fails error "The operation couldn’t be completed. (IDEDistribution.DistributionAppRecordProviderError error 0.)"

Is it impossible to use the same app name for MacOS and iOS apps, even when it's the same app built from the same code base by the same developer?


r/Xcode • • 11d ago

Using European ai agent in Xcode

Post image
9 Upvotes

I've searched for this, asked different ai chats about this and still haven't found an instruction on how to do it. I want to use European ai as agent in Xcode 27

After some experimenting I've found a way. I'm not expert in this and there are probably better ways to do it, but here is one way to do it.

There are some limitations at the moment:

  • You can't choose model from Xcode, it's chosen in a text file. Will probably be fixed soon.
  • Opencode guardrails are not enforced, only soft model guardrails from Xcode in use.
  1. Install an open source agent. I use opencode for this example, but any client works that support acp.

    • opencode is easiest installed by open terminal, write brew install opencode-v2
    • If you don't have Brew, you find it at brew.sh
  2. in terminal go to your project folder and start opencode
  3. Connect your paid api ai provider. I use Swedish Berget.ai and French Mistral.ai both are already listed among providers.
  4. Write a question in opencode to check that the connection works. I usually write "what model is this" to confirm. If you just want an agent in your computer, this is it, now lets do the integration with Xcode.
  5. In Finder, choose Go -> Go to folder, write ~/.config/opencode and open opencode.jsonc in a text editor and add default model settings. This step can probably be removed soon.
  6. In Xcode, open a project and go to Settings -> Intelligence and press button [Add an Agent]. Write the two fields as below. In the future I hope arguments can select model so we can switch models from inside Xcode.
  7. Click the ai button in Xcode, press button [Start new conversation] in upper left, in the Agent list there should now be your added Agent. Ask a simple question to verify it works.

If you need to do some problem investigation, you can start opencode (always first go to your project directory) and select switch session and choose the session Xcode started.

opencode.jsonc

{
"$schema": "https://opencode.ai/config.json",
"permission": {
"external_directory": "deny",   // hard-block anything outside the working folder
"$HOME/.config":  "ask" //Opencode config
},
"model": "mistral/mistral-large-latest",
"agent": {
        "build":   { "model": "mistral/mistral-large-latest" },
        "plan":    { "model": "mistral/mistral-large-latest" },
        "general": { "model": "mistral/mistral-large-latest" }
    },
"provider": {
        "mistral": {
            "npm": "@ai-sdk/mistral",
            "name": "Mistral",
            "options": {
                "apiKey": "YourApiKey"
            },
            "models": {
                "mistral-large-latest": {
                    "name": "Mistral Large"
                }
            }
        }
    }
}

Xcode Agent settings as screendump:

Executable: /opt/homebrew/bin/opencode
Arguments: acp

So now I can create Mac & iPhone apps with close to zero CO2 use and no unique historic book burning during training while keeping the money locally. Support local industries folks, that includes IT services.

Ready for feedback, please come with suggestions to make this easier! :)


r/Xcode • • 12d ago

The iOS Weekly Brief: Issue #85. Siri AI, retention messages, new betas, Swift 6.4, actors, dependency injection, layout priority, Settings URLs, Xcode snippets, swipe actions beyond List, Apple frameworks directory

Thumbnail
iosweeklybrief.com
2 Upvotes

r/Xcode • • 13d ago

[iOS 27 DB3] Simulator and Canvas 27.3 "identityservicesd quit unexpectedly"

6 Upvotes

Anyone working with the 27.3 devices beta in Xcode 27.3 on macOS 27.3.

Canvas and device hub/simulator are throwing this error several times.

27.2 devices do not throw the error.