Adding A New Resource File To Project

From rootshell wiki

Jump to: navigation, search


This page belongs to Turned On Ventures Guideline Series.

Adding Regular Resources

  • The name of the file should be : "categoryName_objectName.fileType" for example: "background_spinImage.png" or "effects_shoot.aif".
  • Here is a list of the different media types and the type of files that they contain:
Image: any form of image file. Could be a background, animated element, pictures, textures or ...
Sound: any form of sound file. Could be background music, sound effects, interface sounds or ...
Video: all video files.
Databases: any form of stored information. Could be an actual SQL file, text file, Localizable.strings files or ...
  • The project directory structure is as follows:
    Resource file.png
Other than the info.plist files, all other resources should be in the "Resources" director, in their corresponding media type directory.
If the resource belongs to a specific group it should be placed in that directory.
If the resource belongs to a specific version of the project then it should be placed in a separate folder (a folder with the name of the version).
  • The project group structure (the groups in Xcode) must be the same as the project's directory structure, so if you feel that the resource should be in a specific group then make the appropriate changes to the actual directory structure too.
  • If the resource file is localizable, then there will be a "language.lproj" folder where the file ought to be, (two example of localizable folders are: "english.lproj" and "IT.lproj"). These localizable folders will be added automatically by Xcode, for more information on localizable files and localizing look at: Localizing Resource Files.
  • New resources and folders must be added to SVN.
  • If the resource is directly used by a class, it should be mentioned in the class' .h file, for more information look at the header comment in: Adding A New Code File To Project.

Adding Info.Plist Files

  • Info.plist files should be added to the "Infoplists" folder (in the project's directory) and if there is more than one version of the project it should be in a folder with the version's name.

Adding Interface Files

  • Interface files should be added to the "NIBs" folder (in the project's directory), all the rules of regular resource files apply.

Interface file.png

HierarchyPrevious.gif Adding A New Code File To Project | Adding New Documents To The Project HierarchyNext.gif

Copyright Turned On Ventures 2010,

Personal tools