iOS(Xcode) Project Structure
(iPhone uses Model View Controller and Delegate patterns in its structure as seen here)
- =directory to contain any classes generated upon creation of project or any other classes you create on your own
- will contain AppNameDelegate.h, AppNameDelgate.m
- will contain AppNameViewController.h, AppNameViewController.m
- Things like images and sounds that are used by application at run time
- Note some names like icon.png, icon~ipad.png and icon~iphone.png can NOT be changed.
- Will contain Views (these are your apps interfaces) in the naming conventions like LaunchScreen.xib or MySecondViewController.xib, etc.
- = again can contain code that is generated or you create.
- will contian main.m = main function of application
- PropertyList Info.plist = contains name vlaue pairings giving icons, whether app needs persistent Wi-Fi connection, default language of applciation and much more. Lists if you want different images for different devices (icon.png = default, icon~ipad.png = for ipad, icon~iphone.png = for iphone). Note can bring up this list by
-
- There are various frameworks offered by apple as well as third-party frameworks (think of these as packages/libraries) that can be used by applications. This is where you list them.
- Applications with user interfaces will have listed here CoreGraphis.framework, Foundation.framework, UIKit.framework.
- ADD NEW Framework: Right click(2 fingers) -> Add -> Existing Frameworks.
- to use a newly added frameword in code add #import ***** at the top
-
- This contains the applicaton itself
Swift based |
Older Objective C |
|
|
GENERAL TAB
-
version number, build number
-
deployment target, device, main interface,orientations.
CAPABILITIES TAB
-
declare some types of required capabilities of your app (could be required hardware, features, background execution) (partial list is shown below)
-
adds the required feature/capability keys (like UIRequiredDeviceCapabilities keys or UIBackgroundModes keys) in your app’s Info.plist file.
Here I am adding the Maps Capability to my app.
Here is the resulting Info.plist with Maps added to it.
INFO TAB
-
THIS IS YOUR Info.plist file
-
As discussed previously, it is where you declare some types of required features of your app (could be required hardware, features, background execution) (partial list is shown below)
-
you can edit by hand here (some of the other Project settings tab- GENERAL, CAPABILITIES edit the items here graphically)
Most apps don't need special editing of Info.plist but, here are a few cases from developer.apple.com
- Apps that require a persistent Wi-Fi connection must declare that fact. If your app talks to a server across the network, you can add the Application uses Wi-Fi entry to the Info tab of your project. This entry corresponds to the UIRequiresPersistentWiFi key in the Info.plist file. Setting this key to YES prevents iOS from closing the active Wi-Fi connection when it has been inactive for an extended period of time. This key is recommended for all apps that use the network to communicate with a server.
-
Newsstand apps must declare themselves as such. Include the UINewsstandApp key to indicate that your app presents content from the Newsstand app.
-
Apps that define custom document types must declare those types. Use the Document Types section of the Info tab to specify icons and UTI information for the document formats that you support. The system uses this information to identify apps capable of handling specific file types. For more information about adding document support to your app, see Document-Based App Programming Guide for iOS.
-
Apps can declare any custom URL schemes they support. Use the URL Types section of the Info tab to specify the custom URL schemes that your app handles. Apps can use custom URL schemes to communicate with each other. For more information about how to implement support for this feature, see Using URL Schemes to Communicate with Apps.
-
Apps should provide usage descriptions for certain app features. Whenever there is a privacy concern about an app accessing a user’s data or a device’s capabilities, iOS frameworks prompt the user and request permission for your app to use the feature. Apps that use these features should provide privacy usage descriptions that explain what your app plans to do with the corresponding data. For information about the features that require user permission, see Table 1-2.
For detailed information about the keys and values you can include in the Info.plist file, see Information Property List Key Reference.
|
BUILD SETTINGS TAB
- No reason to edit this directly...
BUILD PHASES TAB
-
you can add libraries/frameworks (3rd party) here --click on + under Link Binary with libraries.
Here you can see some of the many frameworks available to link in (and you can have your own 3rd party also)
|