File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -287,6 +287,23 @@ struct HomeView: View {
287287 } else {
288288 pendingJITEnableConfiguration = config
289289 }
290+ case " kill-process " :
291+ if let pidStr = components? . queryItems? . first ( where: { $0. name == " pid " } ) ? . value, let pid = Int ( pidStr) {
292+ pubHeartBeat = false
293+ startHeartbeatInBackground ( showErrorUI: false )
294+ DispatchQueue . global ( qos: . userInitiated) . async {
295+ sleep ( 1 )
296+ var error : NSError ?
297+ let success = JITEnableContext . shared. killProcess ( withPID: Int32 ( pid) , error: & error)
298+ DispatchQueue . main. async {
299+ if success {
300+ LogManager . shared. addInfoLog ( " Killed process \( pid) via URL scheme " )
301+ } else {
302+ LogManager . shared. addErrorLog ( " Failed to kill process \( pid) : \( error? . localizedDescription ?? " Unknown error " ) " )
303+ }
304+ }
305+ }
306+ }
290307 case " launch-app " :
291308 if let bundleId = components? . queryItems? . first ( where: { $0. name == " bundle-id " } ) ? . value {
292309 HapticFeedbackHelper . trigger ( )
You can’t perform that action at this time.
0 commit comments