1 Reply
      Latest reply on Jun 27, 2019 12:27 AM by eskimo
      dickfala Level 1 Level 1 (0 points)

        Hi everyone,

        I have some question,

        Have possible the  app in the background execution and detect the user turn on or not about the location service, hotspot,bluetooth and camera?

        We have not use the Apple MDM solution.

        But my company need our to create the app to detect the four function  turn on or not.

        We need detect the user turn on the location service, hotspot , bluetooth and camera, the app will record the time in app database.

        But we encounter some problem,

        We can't remain the app all the day in the background execution to detect.

        The user can force to clean the iphone memory( click long time the power button , then click the home button long time to back apps scrren ) to kill the all the app in the background task.

        When the user clean the background task app and restart the device, the app can't resume to start detect the user turn on the function or not.

        Is the general ios app permission have possible to achieve the functions?

        thank you very much.

        • Re: Detecting user turn on location, hotspot,bluetooth and camera when app is in the background ?
          eskimo Apple Staff Apple Staff (13,905 points)

          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.

          You wrote:

          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?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"