#include &lt;stdio.h&gt;

#include &lt;IOBluetooth/IOBluetoothUtilities.h&gt;

static void testFunction(void *userRefCon, IOBluetoothUserNotificationRef inRef, IOBluetoothObjectRef objectRef) {
    printf(&#34;Was registred\n&#34;);
}

int main(int argc, char *argv[])
{
    IOBluetoothUserNotificationRef connectNotification;

    printf(&#34;Start\n&#34;);
    connectNotification = IOBluetoothRegisterForDeviceConnectNotifications(
                                        testFunction, nullptr);

    IOBluetoothUserNotificationUnregister(connectNotification);
    connectNotification = nullptr;

    printf(&#34;Stop\n&#34;);
    return 0;
}
