How to get bundle identifier of application by context id or by mach port in iOS 7(Jailbroken)?

StackOverflow https://stackoverflow.com/questions/21673932

سؤال

I now we can use contextIdAtPosition method to get context id of the front most application, but how can I use context id to get the bundle identifier of the front most application?Thank you!

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top