Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Sure you can do this when the device is Jailbroken, so that you can reach out of the sandBox. You can get the information you want by analyzing Info.plist in every <em>.app which is located at every path "/var/mobile/Applications/", such as "/var/mobile/Applications/</em>/*.app/Info.plist" Here is my code.</p> <pre><code>- (void)scan { NSString *pathOfApplications = @"/var/mobile/Applications"; NSLog(@"scan begin"); // all applications NSArray *arrayOfApplications = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pathOfApplications error:nil]; for (NSString *applicationDir in arrayOfApplications) { // path of an application NSString *pathOfApplication = [pathOfApplications stringByAppendingPathComponent:applicationDir]; NSArray *arrayOfSubApplication = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pathOfApplication error:nil]; // seek for *.app for (NSString *applicationSubDir in arrayOfSubApplication) { if ([applicationSubDir hasSuffix:@".app"]) {// *.app NSString *path = [pathOfApplication stringByAppendingPathComponent:applicationSubDir]; path = [path stringByAppendingPathComponent:@"Info.plist"]; // so you get the Info.plist in the dict NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; // code to analyzing the dict. } } } NSLog(@"scan end"); } </code></pre> <p>Here is sample content of an Info.plist. So, get values for any key you care about.</p> <pre><code>{ BuildMachineOSBuild = 11G63; CFBundleDevelopmentRegion = "zh_CN"; CFBundleDisplayName = "\U4e50\U89c6\U5f71\U89c6HD"; CFBundleExecutable = LetvIpadClient; CFBundleIconFile = "icon.png"; CFBundleIconFiles = ( "icon.png", "icon@2x.png" ); CFBundleIdentifier = "com.letv.ipad.hdclient"; CFBundleInfoDictionaryVersion = "6.0"; CFBundleName = LetvIpadClient; CFBundlePackageType = APPL; CFBundleResourceSpecification = "ResourceRules.plist"; CFBundleShortVersionString = "3.1"; CFBundleSignature = "????"; CFBundleSupportedPlatforms = ( iPhoneOS ); CFBundleURLTypes = ( { CFBundleURLName = "m.letv.com"; CFBundleURLSchemes = ( letvIPad ); } ); CFBundleVersion = "3.1"; DTCompiler = "com.apple.compilers.llvmgcc42"; DTPlatformBuild = 10A403; DTPlatformName = iphoneos; DTPlatformVersion = "6.0"; DTSDKBuild = 10A403; DTSDKName = "iphoneos6.0"; DTXcode = 0450; DTXcodeBuild = 4G182; LSRequiresIPhoneOS = 0; MinimumOSVersion = "4.3"; UIDeviceFamily = ( 2 ); "UILaunchImageFile~ipad" = ( "Default.png", "Default@2x.png" ); UIPrerenderedIcon = 1; UIStatusBarHidden = 1; UISupportedInterfaceOrientations = ( UIInterfaceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight ); "UISupportedInterfaceOrientations~ipad" = ( UIInterfaceOrientationLandscapeRight, UIInterfaceOrientationLandscapeLeft ); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload