New Info.plist variable PRODUCT_BUNDLE_PACKAGE_TYPE, what is it?

Inspecting an Info.plist for a new project, created in the Xcode 11 public release I found a new variable, PRODUCT_BUNDLE_PACKAGE_TYPE. It's being assigned to CFBundlePackageType. Searches google searches, including scoped to "site:apple.com", checks of the release notes, and developer forums don't show any documentation on what it is. It doesn't appear in the build settings. I went so far as to re-install Xcode 10.3 and confirmed that it's not present there.


It's not blocking me, but I'm terribly curious.

Package bundle? Bundle package? Who decides the name?


Not exactly an oxymoron, I suspect PBP type has to do with the new multi-platform offerings, where you can now tick a box and make one app for iOS & macOS, as an example.


'package:macOS ~ bundle:iOS -- Bit of background from the docs:


Bundles and Packages

Although bundles and packages are sometimes referred to interchangeably, they actually represent very distinct concepts:

  • A package is any directory that the Finder presents to the user as if it were a single file.
  • A bundle is a directory with a standardized hierarchical structure that holds executable code and the resources used by that code.


Packages provide one of the fundamental abstractions that makes macOS easy to use. If you look at an application or plug-in on your computer, what you are actually looking at is a directory. Inside the package directory are the code and resource files needed to make the application or plug-in run. When you interact with the package directory, however, the Finder treats it like a single file. This behavior prevents casual users from making changes that might adversely affect the contents of the package. For example, it prevents users from rearranging or deleting resources or code modules that might prevent an application from running correctly.

Note: Even though packages are treated as opaque files by default, it is still possible for users to view and modify their contents. On the contextual menu for package directories is a Show Package Contents command. Selecting this command displays a new Finder window set to the top level of the package directory. The user can use this window to navigate the package's directory structure and make changes as if it were a regular directory hierarchy.


Whereas packages are there to improve the user experience, bundles are geared more toward helping developers package their code and to helping the operating system access that code. Bundles define the basic structure for organizing the code and resources associated with your software. The presence of this structure also helps facilitate important features such as localization. The exact structure of a bundle depends on whether you are creating an application, framework, or plug-in. It also depends on other factors such as the target platform and the type of plug-in.


The reason bundles and packages are sometimes considered to be interchangeable is that many types of bundles are also packages. For example, applications and loadable bundles are packages because they are usually treated as opaque directories by the system. However, not all bundles are packages and vice versa.

New Info.plist variable PRODUCT_BUNDLE_PACKAGE_TYPE, what is it?
 
 
Q