Force lock screen

If you want to know how they do this :

The phone is paired with the bluetooth device included in their hardware. If you check further, you will notice that this Bluetooth device has the "Keyboard" profile: just check on your phone, you will see it is recognized as a wireless keyboard... Interesting... Do you see the answer coming ? ...

You Bet ! The device sends to the phone the lock screen command-key as if it was a connected bluetooth keyboard (yes, because a BT Keyboard can actually do this). And here you go.

=== EDIT ===

Please take a look at this HID usage table, you will find some useful command codes. The key codes we're looking for are most probably 0x81 or 0x82.


After contacting Apple Developer Technical Support there is no supported way to achieve this functionality without using private API's. Use of these will cause for your app to be rejected.

My guess is that CellControl was able to make it through review because the only way that they make use of this feature is if you have their hardware installed in your vehicle, device paired with it, and begin driving. My guess is that during app review, Apple did not buy one of their devices and actually test it. Although I've always been under the impression that they scan you binaries to check for undocumented API use but that seems to be wrong.

The other possibility as @Chris mentioned is they could have had an arrangement with Apple before starting development. While this seems unlikely, it is possible.

Here are some excerpts from Apple Developer Technical Support:

Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.


Hello,

Developer Technical Support is not in a position to reverse engineer other developer's software on your behalf. Apps that are doing seemingly-impossible things generally fall into one of two categories:

  • they're breaking the rules and App Review hasn't caught them yet (A)

  • their marketing material is being economical with the truth (B)

I can say that there is no supported way lock the device from your iOS app.


Hope this helps someone in the future.