By using the create groups for any added folders method, all resources are placed under the Resource Package path, and there is no hierarchical concept.
The expression like create folder references for any added folders is to put them in the installation package as the original folder.
There are several folders in the installation package: (these files are located in the home path)
(1) Documents: this folder is used to write program data files to this directory to store user data and data to be backed up.
(2) Library: include Caches and Preferences.
Preferences: used to store user Preferences. You cannot directly create Preferences. You should use the NSUserDefaults class to obtain and set application Preferences.
Caches: used to store application-specific support files and save the information required for the application restart process.
(3) tmp: Temporary Folder. The folder will be deleted the next time it is started.
How to get the directory:
(1) method for obtaining home directories:
NSString * homeDir = NSHomeDirectory ();
(2) how to obtain the paths of the Documents directory:
NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
NSString * docDir = [paths objectAtIndex: 0];
(3) how to obtain the Caches directory path:
NSArray * paths = NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES );
NSString * cachesDir = [paths objectAtIndex: 0];
(4) method for obtaining the tmp directory path:
NSString * tmpDir = NSTemporaryDirectory ();
(5th vertex of the resource file in the application package (apple.png );
NSString * imagePath = [[NSBundle mainBundle] pathForResource: @ "apple" ofType: @ "png"];