Class AppleInfoPlistParsing


  • public class AppleInfoPlistParsing
    extends Object
    Utility class to parse Info.plist from an Apple bundle.
    • Method Detail

      • getBundleIdFromPlistStream

        public static Optional<String> getBundleIdFromPlistStream​(Path plistPath,
                                                                  InputStream inputStream)
                                                           throws IOException
        Extracts the bundle ID (CFBundleIdentifier) from an Info.plist, returning it if present.
        Throws:
        IOException
      • getBundleTypeFromPlistStream

        public static Optional<String> getBundleTypeFromPlistStream​(Path plistPath,
                                                                    InputStream inputStream)
                                                             throws IOException
        Extracts the bundle type (CFBundlePackageType) from an Info.plist, returning it if present.
        Throws:
        IOException
      • isWatchOSAppFromPlistStream

        public static Optional<Boolean> isWatchOSAppFromPlistStream​(Path plistPath,
                                                                    InputStream inputStream)
                                                             throws IOException
        Extracts the watchOS app flag (WKWatchKitApp) from an Info.plist, returning it if present.
        Throws:
        IOException
      • getPropertyValueFromPlistStream

        public static com.dd.plist.NSObject getPropertyValueFromPlistStream​(Path plistPath,
                                                                            InputStream inputStream,
                                                                            String propertyKey)
                                                                     throws IOException
        Extracts a property value from an Info.plist, returning it if present.
        Throws:
        IOException