Matt Van Horn 4ec0e96264 anisette: fix crash in date formatter (#422)
## What does this PR do?

Password login can terminate with an illegal-instruction crash on Linux,
leaving the user logged out. Anisette client time was formatted with
DateFormatter and an explicitly assigned Gregorian calendar. That
formatting path reaches Foundation’s NSCalendar bridging code, where the
reported crash occurs.

AnisetteData now formats client time with Date.ISO8601FormatStyle,
avoiding the DateFormatter calendar bridge. The header retains its UTC
timestamp format with whole seconds and a trailing Z. New parameterized
tests check the complete header dictionary for the Unix epoch, a year
boundary, leap day, and a timestamp with fractional seconds.

Fixes #184

## How was it tested?

Ran `swift test` locally on macOS for the xtool AnisetteData change; it
fails the same way on the base branch, so the failure predates this
change (it fails the same way on upstream/main).
`swift build` failed because an async call in a defer body prevented
compilation.
`swift test` failed during compilation with the same async-in-defer
error, so the tests did not run.
`repo_lint` ran without reported output.
`make lint SWIFTLINT_FLAGS='--reporter=github-actions-logging' | tee
swiftlint.log` ran with no lint diagnostics shown in the transcript.

The tests in `Tests/XToolTests/AnisetteDataTests.swift` fail without the
fix in the xtool AnisetteData change (checked by reverting the source
changes).

## AI tool usage

How much of the code in this PR was AI-assisted? (check one)

- [ ] **0** - No AI was used to write code
- [ ] **1** - I was assisted by AI in writing code. I reviewed the
finished result.
- [ ] **2** - I set the AI going and left it to it; nobody has read the
result - no review, or AI review only

AI was used for assistance.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Client timestamps now use a consistent UTC ISO 8601 format with dashed
dates, colon-separated times, and no fractional seconds. This applies to
timestamps with or without fractional seconds in the source date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
4ec0e96264 · 2026-11-06 00:17:14 -05:00
446 Commits
2026-05-18 03:21:49 -04:00
2026-07-18 16:15:16 -04:00
2026-10-28 19:22:26 -04:00
2026-10-28 17:48:38 -04:00
2026-11-02 21:57:22 +00:00
2026-10-06 02:15:13 +00:00

xtool

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, and macOS.

Overview

xtool is a cross-platform (Linux/WSL/macOS) tool that replicates Xcode functionality with open standards.

✅ Build a SwiftPM package into an iOS app

✅ Sign and install iOS apps

✅ Interact with Apple Developer Services programmatically

Getting Started

  1. Follow the guide to install xtool
  2. Create and run your first xtool-powered app by following the tutorial!

Examples

Screenshot

A screenshot of xtool being invoked from VSCode

Command line interface

$ xtool --help
OVERVIEW: Cross-platform Xcode replacement

USAGE: xtool <subcommand>

OPTIONS:
  -h, --help              Show help information.

CONFIGURATION SUBCOMMANDS:
  setup                   Set up xtool for iOS development
  auth                    Manage Apple Developer Services authentication
  sdk                     Manage the Darwin Swift SDK

DEVELOPMENT SUBCOMMANDS:
  new                     Create a new xtool SwiftPM project
  dev                     Build and run an xtool SwiftPM project
  ds                      Interact with Apple Developer Services

DEVICE SUBCOMMANDS:
  devices                 List devices
  install                 Install an ipa file to your device
  uninstall               Uninstall an installed app
  launch                  Launch an installed app

  See 'xtool help <subcommand>' for detailed help.

Library

You can consume xtool itself as a Swift Package, to enable your own app to interact with Apple Developer Services, iOS devices, and more. You can use this by adding XKit or XToolSupport as a SwiftPM dependency.

Note: while we aim to uphold semver semantics on the CLI interface (breaking change = major version bump), the Swift interface does not offer the same guarantees.

// package dependency:
.package(url: "https://github.com/xtool-org/xtool", .upToNextMinor(from: "1.2.0"))
// target dependency:
.product(name: "XKit", package: "xtool")
S
Description
Languages
Swift 99%
Shell 0.3%
Makefile 0.2%
JavaScript 0.2%
C 0.1%
Other 0.1%