Skip to content

fix(ios): support Xcode 16+ team detection and fix ntohl build error#22773

Merged
steipete merged 4 commits into
openclaw:mainfrom
brianleach:fix/ios-xcode16-signing-and-build
Feb 24, 2026
Merged

fix(ios): support Xcode 16+ team detection and fix ntohl build error#22773
steipete merged 4 commits into
openclaw:mainfrom
brianleach:fix/ios-xcode16-signing-and-build

Conversation

@brianleach

@brianleach brianleach commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

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

Greptile Summary

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).

Confidence Score: 4/5

  • 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

Last reviewed commit: 3cdd0c4

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios scripts Repository scripts size: S labels Feb 21, 2026
@steipete
steipete force-pushed the fix/ios-xcode16-signing-and-build branch from 3cdd0c4 to 00721c6 Compare February 24, 2026 14:21
@openclaw-barnacle openclaw-barnacle Bot removed the app: ios App: ios label Feb 24, 2026
Xcode 16+/26 no longer writes IDEProvisioningTeams to the preferences
plist, breaking ios-team-id.sh for newly signed-in accounts. Add
provisioning profile fallback and actionable error when an account
exists but no team ID can be resolved. Also replace ntohl() with
UInt32(bigEndian:) for Swift 6 compatibility and gitignore Xcode
build output directories.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@steipete
steipete force-pushed the fix/ios-xcode16-signing-and-build branch from 00721c6 to ae72cd5 Compare February 24, 2026 14:21
@steipete
steipete merged commit 069c56c into openclaw:main Feb 24, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants