1. Bundle file
Bundle file is the resource file package. We organize many pictures, XIB and text files together and package them into a bundle file. facilitates referencing resources within packages in other projects.
The bundle file is static, that is, the resource files that we include into the package are not compiled as a resource bundle. It also means that the bundle package cannot contain executable files. It is only as a resource and is parsed into a specific binary data.
2. Making Bundle files
1. New Bundle Project
To create a project named Yooweisourcesbundle (the last bundle file name to generate), note that the bundle defaults to the MacOS system, and the Xcode high version needs to be in the MacOS = Framework & Library option is found under options.
Open Xcode, select file----> New---> Project.
Select MacOS----> Framework & Library---> Bundles.
2. Modify Bundle configuration information
Set the Build Setting COMBINE_HIDPI_IMAGES
to NO, otherwise the image in the Bundle is in TIFF format.
3. Optional configuration
As a resource bundle, just need to compile just fine, no need to install the related configuration, set the Skip install to Yes. Also remove the value of the installation path installation Directory.
The PCH file and the strings file for the resource bundle can be deleted.
4. Add Files
5. Compile and generate Bundle files
Then show in finder and look at the generated files. We see that it generates a. bundle resource file for both the real machine and the simulator.
Select the. bundle file right-click to display the package contents, and we can see the resource files that were previously dragged into the project.
The use of bundles continues tomorrow ...
Ios-bundle Resource File Package