Testing Hardened Runtime?

So I've enabled Hardened Runtime on my app but want to test it actually does what it is meant to do.


So I put in a simple couple of calls to location services on a button:


    CLLocationManager* locMan = [CLLocationManager new];
    [locMan startUpdatingLocation];

and expected my app to crash on Mojave since I hadn't ticked the "Location" option in the "Resource Access" section of the Hardened Runtime capabilities.


Instead it carried on as normal and I saw the Location StatusItem show up in the menu bar with my app listed as something that was using Location services.


So now I'm wondering if Hardened Runtime is really turned on for my app or not. Or am I misunderstanding its usage?


FYI - My app is distributed via Developer ID provisioning, not the App Store.

Replies

Here is the answer:

https://wiki.freepascal.org/Hardened_runtime_for_macOS

Is it possible to check whether a process has the hardened runtime enabled at run-time, e.g. similar to how the App Sandbox status can be viewed in Activity Monitor?