MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / uninstall_app

Function uninstall_app

packages/server/src/api/routes.rs:2406–2432  ·  view source on GitHub ↗
(
    State(state): State<AppState>,
    Path(udid): Path<String>,
    Json(payload): Json<UninstallPayload>,
)

Source from the content-addressed store, hash-verified

2404}
2405
2406async fn uninstall_app(
2407 State(state): State<AppState>,
2408 Path(udid): Path<String>,
2409 Json(payload): Json<UninstallPayload>,
2410) -> Result<Json<Value>, AppError> {
2411 state.accessibility_cache.invalidate(&udid);
2412 if payload.bundle_id.trim().is_empty() {
2413 return Err(AppError::bad_request(
2414 "Request body must include `bundleId`.",
2415 ));
2416 }
2417 if android::is_android_id(&udid) {
2418 let action_udid = udid.clone();
2419 run_android_action(state, move |android| {
2420 android.uninstall_app(&action_udid, &payload.bundle_id)
2421 })
2422 .await?;
2423 return Ok(json(json_value!({ "ok": true })));
2424 }
2425 let action_udid = udid.clone();
2426 run_bridge_action(state.clone(), move |bridge| {
2427 bridge.uninstall_app(&action_udid, &payload.bundle_id)
2428 })
2429 .await?;
2430 spawn_accessibility_warmup(state, udid);
2431 Ok(json(json_value!({ "ok": true })))
2432}
2433
2434async fn get_pasteboard(
2435 State(state): State<AppState>,

Callers

nothing calls this directly

Calls 9

is_android_idFunction · 0.85
run_android_actionFunction · 0.85
jsonFunction · 0.85
run_bridge_actionFunction · 0.85
invalidateMethod · 0.80
is_emptyMethod · 0.80
cloneMethod · 0.65
uninstall_appMethod · 0.45

Tested by

no test coverage detected