Skip to content

Add privacy/permissions management tools #35

@Jason-Abbott

Description

@Jason-Abbott

Add MCP tools to manage simulator privacy permissions: privacy_grant_sim, privacy_revoke_sim, privacy_reset_sim.

Commands

  • xcrun simctl privacy <device> grant <permission> <bundle-id>
  • xcrun simctl privacy <device> revoke <permission> <bundle-id>
  • xcrun simctl privacy <device> reset <permission> [bundle-id]

Valid permissions

all, calendar, contacts-limited, contacts, location, location-always, photos-add, photos, media-library, microphone, motion, reminders, siri

Implementation

New files

  • Sources/Tools/Simulator/PrivacyGrantSimTool.swift
  • Sources/Tools/Simulator/PrivacyRevokeSimTool.swift
  • Sources/Tools/Simulator/PrivacyResetSimTool.swift

SimctlRunner changes

Add methods:

func privacyGrant(udid: String, permission: String, bundleId: String) async throws -> SimctlResult
func privacyRevoke(udid: String, permission: String, bundleId: String) async throws -> SimctlResult
func privacyReset(udid: String, permission: String, bundleId: String?) async throws -> SimctlResult

Tool parameters

grant/revoke:

  • simulator: string (optional)
  • permission: string (required)
  • bundle_id: string (required)

reset:

  • simulator: string (optional)
  • permission: string (required)
  • bundle_id: string (optional) - if omitted, resets for all apps

Checklist

  • Add privacy methods to SimctlRunner
  • Create PrivacyGrantSimTool.swift
  • Create PrivacyRevokeSimTool.swift
  • Create PrivacyResetSimTool.swift
  • Register tools 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