AppStore apps themselves are sandboxed too. You can’t execute all arbitrary code just because it’s an app.