On iOS 7.0 and below, SBFrontmostApplicationDisplayIdentifier
from the Springboard framework specified the app running in the foreground, but that capability has been blocked (considered as a vulnerability, see the Common Vulnerabilities and Exposures page dedicated to it here) in iOS 8.
Does anyone have an iOS 8 alternative for this?