Architecturally, it's two "apps", a System Preference pane and a daemon that actually does the hiding.
There's a new dance in the last year or so where you must notarize your app before distribution. This is a bit more involved than just code signing, but it's workable. If you codesign and notarize your app, it's still possible for everyday users to download and launch without too much trouble.