Find foreground application

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

Accepted Reply

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"

Replies

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"

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

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"