3 Replies
      Latest reply: Jan 12, 2017 1:45 PM by eskimo RSS
      ovskl Level 1 Level 1 (0 points)

        Is there any way to find currently active application? Some options in MFI Accessory protocol to report curently active application? Any other posibilities

        • Re: Find foreground application
          eskimo Apple Staff Apple Staff (7,450 points)

          Is there any way to find currently active application?

          There’s no supported way to do this.  Historically folks have built heuristics to infer the frontmost app from various bits of state but that’s not reliable and is becoming increasingly difficult as the iOS sandbox tightens up.

          Just for my own curiosity, why do you want this info?

          Share and Enjoy

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

            • Re: Find foreground application
              ovskl Level 1 Level 1 (0 points)

              Thanks,

               

              We basicly want our device to behave differently based on what is top application is. on/off switch depending if app belongs to the group or not.

              I also wander why its such a big secret to find top active application?

               

              Thanks

                • Re: Find foreground application
                  eskimo Apple Staff Apple Staff (7,450 points)

                  I also wander why its such a big secret to find top active application?

                  As a rule iOS prevents you from seeing any context outside of your app’s sandbox.  IMO this is as it should be.  In this specific case, for example, you wouldn’t want one app to be able to monitor how often you use their competitor’s app.

                  Share and Enjoy

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