#22773: fix(ios): support Xcode 16+ team detection and fix ntohl build error
app: ios
scripts
size: S
Cluster:
macOS Notification and Menu Fixes
## Summary
- **`scripts/ios-team-id.sh`**: Xcode 16+/26 no longer writes the `IDEProvisioningTeams` key to `com.apple.dt.Xcode.plist`, causing `ios-configure-signing.sh` to silently fail for any newly signed-in developer account. This adds a provisioning profile fallback (`load_teams_from_xcode_managed_profiles`) and detects when an Apple account is present but no team ID can be resolved, providing actionable guidance instead of a generic error.
- **`GatewayConnectionController.swift`**: `ntohl()` is not visible in Swift 6 strict concurrency mode on Xcode 26. Replaced with the equivalent `UInt32(bigEndian:)` which is pure Swift and works across all toolchain versions.
- **`.gitignore`**: Added `apps/ios/build/`, `apps/shared/OpenClawKit/build/`, and `Swabble/build/` — Xcode's `xcodebuild` output directories were not covered by the existing `.build/` entries (which only match SwiftPM output).
## Test plan
- [ ] Run `scripts/ios-team-id.sh` on Xcode 16+ with a signed-in Apple account — should resolve team ID or show actionable instructions
- [ ] Run `scripts/ios-team-id.sh` on Xcode 15 — existing behavior unchanged (IDEProvisioningTeams path still works)
- [ ] Build iOS target with Xcode 26 / Swift 6 — `GatewayConnectionController.swift` compiles without error
- [ ] Verify `xcodebuild` output in `build/` dirs is ignored by git
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixed iOS build compatibility with Xcode 16+ and Swift 6. The PR addresses team detection failure on Xcode 16+ by adding a provisioning profile fallback and improves error messaging. Replaced deprecated `ntohl()` with Swift's `UInt32(bigEndian:)` for Swift 6 compatibility. Added appropriate Xcode build directory entries to `.gitignore`.
- **`scripts/ios-team-id.sh`**: Added `load_teams_from_xcode_managed_profiles()` fallback that parses local provisioning profiles when Xcode preferences don't contain team data (Xcode 16+ behavior). Enhanced error messages with actionable guidance when Apple account is present but team ID cannot be resolved.
- **`GatewayConnectionController.swift`**: Replaced C function `ntohl()` with native Swift `UInt32(bigEndian:)` to fix compilation under Swift 6 strict concurrency mode.
- **`.gitignore`**: Added `xcodebuild` output directories for `apps/ios/build/`, `apps/shared/OpenClawKit/build/`, and `Swabble/build/` (distinct from existing SwiftPM `.build/` patterns).
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with minimal risk
- Changes are targeted and well-motivated. The Swift change is a straightforward API replacement that's functionally equivalent. The bash script additions follow existing patterns and add useful fallback logic. The .gitignore entries are standard build artifact patterns. Score is 4 (not 5) due to the complexity of the bash script's provisioning profile parsing logic, which would benefit from manual testing on Xcode 16+.
- No files require special attention
<sub>Last reviewed commit: 3cdd0c4</sub>
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
76.1%
#8260: fix(macOS): gateway readiness detection + reversible Configure later
by xksteven · 2026-02-03
75.2%
#10744: fix: update stale MoltbotProtocol paths to OpenClawProtocol
by marezgui · 2026-02-06
74.1%
#15909: Guard notifications on macOS; fix focus issue and build fixes
by jasonkneen · 2026-02-14
74.1%
#23636: iOS: normalize watch quick actions and fix test signing
by mbelinky · 2026-02-22
73.6%
#18792: docs: add macOS source-run troubleshooting for setup/auth issues
by yash27-lab · 2026-02-17
73.6%
#3337: fix(macos-app): patch SwiftPM Bundle.module accessor for app bundle
by skymoore · 2026-01-28
73.5%
#10367: CLI/Ops: resilient browser fill + failover hardening + operations t...
by cluster2600 · 2026-02-06
71.9%
#12121: Fix Swift formatting issues across codebase
by PythonUser42 · 2026-02-08
71.6%
#8876: Confirmaciones para equipo de IT
by m4xjunior · 2026-02-04
71.2%