0

OK, it's as simple as it sounds :

  • I've got a fully-working app
  • I'm trying to 'sandbox' it, as per App Store's current guidelines.

The thing is :

  • The app is executing in the background (as an NSTask), the /bin/kill command, and when I'm trying to execute it (WITH the sandbox entitlements enabled), I'm getting the following error :

kill: 1298: Operation not permitted

Pretty obvious. However, is there ANY way this could be bypassed in a Sandbox-compliant app?


Hint : my goal is to be able to kill app B, from app A : is there any other way?

Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
  • 3
    I hope there isn't a way. Not much of a sandbox if the app can affect other ones! – Ben Clayton Oct 05 '12 at 15:18
  • 1
    @BenClayton But what if the user explicitly consents? Shouldn't he be allowed to do it? – Dr.Kameleon Oct 05 '12 at 15:21
  • Even if you find any workaround, Apple will reject your application. My colleague made application which affects other application using Apple Script, and Apple rejected this application. – Tomasz Wojtkowiak Oct 05 '12 at 15:22
  • @TomaszWojtkowiak I've already got an application in the App Store, and pretty popular to be honest, doing exactly that : killing apps. Well, it surely started in the pre-SandBox era, but it most definitely is still there. But then, Apple is Apple... – Dr.Kameleon Oct 05 '12 at 15:24
  • The application I am talking about was created lately. Apple rejected first version of this application in september, it was after Apple made sandboxing obligatory – Tomasz Wojtkowiak Oct 05 '12 at 15:38
  • @TomaszWojtkowiak I really can't speak for Apple; as they simply keep surprising me every time. However, simply put : blocking an app from doing anything 'unwanted' or mess with the system, sounds fine. But rejecting an app, doing something perfectly-legitimate, on user request, does not make much sense... at least to me. (SandBox for iPhone makes much more sense to me... but a Mac is not a phone...) – Dr.Kameleon Oct 05 '12 at 15:54

1 Answers1

1

Your app must be sandboxed, so it works in its own quarantined environment. It cannot kill any other app.

I have apps in the app store which use the kill command, but it is not sandboxed, so all I can do is bug fixes since 1 June.

Back then there was no guidelines against the kill command, but now it's simply impossible.

Tibidabo
  • 21,461
  • 5
  • 90
  • 86