If you only need the identifier of the front most app, you need to check out SpringBoard
class.
@interface SBApplication : NSObject
-(NSString *)displayIdentifier;
@end
@interface SpringBoard : UIApplication
-(SBApplication *)_accessibilityFrontMostApplication;
@end