It’s unlikely you’ll be able to make much progress on these requirements. For this to work reliably the system would have to specifically support an API where you could register interest in these events and then have the system resume (or relaunch) your app in the background when they occur. Nothing like that exists currently. You’re free to file an enhancement request for that, but I doubt that’d get much traction. The privacy implications would be… well… challenging.
But my company need our to create the app to detect the four function turn on or not.
We have not use the Apple MDM solution.
So what’s the expected deployment scenario? To general users? Or to employees? If it’s the latter, what’s wrong with MDM?
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"