简体   繁体   中英

Get name of iOS app from path

I'm developing an app for jailbroken iOS devices that collects statistics about installed apps (ideally stats about both App Store and Cydia apps). Given the path of an app, is there an easy and reliable way to get the name of the App (as it appears in the Springboard)? Or is there a better way, not using the path at all (ie, is the info centralized somewhere)?

Every app has an info plist that contains its name and icon. Just look inside the .app bundle.

Here is a link to a StackOverflow that shows how to get a bundle info plist value (In this case the version). How can my iphone app detect its own version number?

I beleive the attribute you are looking for is CFBundleDisplayName.

Here is apples list of attributes you can obtain. http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM