Skip to content

Add push notification simulation tool #21

@Jason-Abbott

Description

@Jason-Abbott

Add push_sim MCP tool to simulate push notifications on iOS simulators.

Command

xcrun simctl push <device> <bundle-id> <payload.json>

Implementation

New file

Sources/Tools/Simulator/PushSimTool.swift

SimctlRunner changes

Add method:

func push(udid: String, bundleId: String, payload: String) async throws -> SimctlResult

Tool parameters

  • simulator: string (optional, uses session default)
  • bundle_id: string (required)
  • payload: object (required) - APNs payload JSON

Example payload

{
  "aps": {
    "alert": { "title": "Test", "body": "Hello" },
    "badge": 1,
    "sound": "default"
  }
}

Checklist

  • Add push() method to SimctlRunner
  • Create PushSimTool.swift
  • Register tool in XcodeMCPServer.swift
  • Add tests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions