Skip to main content
Glama
TerminateAppHandler.swift731 B
import Foundation import XCTest import FlyingFox import os @MainActor struct TerminateAppHandler: HTTPHandler { func handleRequest(_ request: FlyingFox.HTTPRequest) async throws -> FlyingFox.HTTPResponse { guard let requestBody = try? await JSONDecoder().decode(TerminateAppRequest.self, from: request.bodyData) else { return AppError(type: .precondition, message: "incorrect request body provided for terminating app").httpResponse } NSLog("[Start] Terminating app \(requestBody.appId)") XCUIApplication(bundleIdentifier: requestBody.appId).terminate() NSLog("[End] Terminating app \(requestBody.appId)") return HTTPResponse(statusCode: .ok) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobile-dev-inc/Maestro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server