Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions example_projects/Weather/.xcodebuildmcp/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
schemaVersion: 1
enabledWorkflows:
- simulator
- ui-automation
debug: false
sentryDisabled: false
sessionDefaults:
projectPath: Weather.xcodeproj
scheme: Weather
simulatorName: iPhone 17 Pro
setupPreferences:
platforms:
- iOS
3 changes: 3 additions & 0 deletions example_projects/Weather/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AGENTS.md

- If using XcodeBuildMCP, use the installed XcodeBuildMCP skill before calling XcodeBuildMCP tools.
101 changes: 101 additions & 0 deletions example_projects/Weather/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Atmos Weather

Atmos Weather is a native SwiftUI weather app prototype for iOS.

## Launch with mock weather data

Build and run the app with XcodeBuildMCP first:

```bash
../../build/cli.js simulator build-and-run
```

Then relaunch the installed app with the mock API argument:

```bash
../../build/cli.js simulator launch-app \
--bundle-id com.sentry.weather.Weather \
--args=--mock-weather-api
```

## JSON fixtures

Fixture JSON files live in:

```text
WeatherTests/Fixtures/
```

Current fixtures:

- `WeatherTests/Fixtures/default-locations.json`
- `WeatherTests/Fixtures/search-locations.json`
- `WeatherTests/Fixtures/weather-report-loc-current-san-francisco.json`

## API schemas

OpenAI-compatible API schema files live in:

```text
Schemas/
```

Current schemas:

- `Schemas/default-locations.schema.json`
- `Schemas/search-locations.schema.json`
- `Schemas/weather-report.schema.json`

These schemas describe the JSON response shape expected by the DTO layer.

## Expected API endpoints

The production client is `URLSessionWeatherAPIClient`. It currently expects a JSON API rooted at:

```text
https://api.atmosweather.example/v1
```

All endpoints are `GET` requests.

| Purpose | Method | Path | Request shape | Schema |
| --- | --- | --- | --- | --- |
| Default saved locations | `GET` | `/locations/default` | No path params, query params, or body. | `Schemas/default-locations.schema.json` |
| Search locations | `GET` | `/locations/search` | Query string: `query=<string>` | `Schemas/search-locations.schema.json` |
| Weather report for a location | `GET` | `/weather/{locationID}` | Path param: `locationID=<WeatherLocationDTO.id>` | `Schemas/weather-report.schema.json` |

### Request examples

Default locations:

```http
GET /v1/locations/default
```

Search locations:

```http
GET /v1/locations/search?query=San%20Francisco
```

Weather report:

```http
GET /v1/weather/loc-current-san-francisco
```

### Response expectations

- Responses must be JSON.
- Successful responses should use a `2xx` HTTP status code.
- Non-`2xx` responses are treated as API failures.

## Tests

Run the app test suite through XcodeBuildMCP:

```bash
../../build/cli.js simulator test
```

UI tests inject `--mock-weather-api` themselves so they do not depend on the production API endpoint.
93 changes: 93 additions & 0 deletions example_projects/Weather/Schemas/default-locations.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"type": "json_schema",
"json_schema": {
"name": "default_locations_response",
"strict": true,
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"locations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"country": {
"type": [
"string",
"null"
]
},
"temperatureC": {
"type": "integer"
},
"highC": {
"type": "integer"
},
"lowC": {
"type": "integer"
},
"condition": {
"type": "string",
"enum": [
"sunny",
"mostly_sunny",
"partly_cloudy",
"cloudy",
"clear_day",
"clear_night",
"light_rain",
"heavy_rain",
"light_snow",
"snow_showers",
"thunderstorms",
"hazy"
]
},
"localTime": {
"type": "object",
"additionalProperties": false,
"properties": {
"hour": {
"type": "integer"
},
"minute": {
"type": "integer"
}
},
"required": [
"hour",
"minute"
]
}
},
"required": [
"id",
"name",
"subtitle",
"country",
"temperatureC",
"highC",
"lowC",
"condition",
"localTime"
]
}
}
},
"required": [
"locations"
]
}
}
}
93 changes: 93 additions & 0 deletions example_projects/Weather/Schemas/search-locations.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"type": "json_schema",
"json_schema": {
"name": "search_locations_response",
"strict": true,
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"locations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"country": {
"type": [
"string",
"null"
]
},
"temperatureC": {
"type": "integer"
},
"highC": {
"type": "integer"
},
"lowC": {
"type": "integer"
},
"condition": {
"type": "string",
"enum": [
"sunny",
"mostly_sunny",
"partly_cloudy",
"cloudy",
"clear_day",
"clear_night",
"light_rain",
"heavy_rain",
"light_snow",
"snow_showers",
"thunderstorms",
"hazy"
]
},
"localTime": {
"type": "object",
"additionalProperties": false,
"properties": {
"hour": {
"type": "integer"
},
"minute": {
"type": "integer"
}
},
"required": [
"hour",
"minute"
]
}
},
"required": [
"id",
"name",
"subtitle",
"country",
"temperatureC",
"highC",
"lowC",
"condition",
"localTime"
]
}
}
},
"required": [
"locations"
]
}
}
}
Loading
Loading