DO NOT use this tag unless you are addressing Apple's iPhone and/or iPod touch specifically. For questions not dependent on hardware, use the tag [ios]. More tags to consider are [xcode] (but only if the question is about the IDE itself), [swift], [objective-c] or [cocoa-touch] (but not [cocoa]). Please refrain from questions regarding the iTunes App Store or about iTunes Connect. If using C#, tag with [mono].
The iPhone is a smartphone made by Apple Inc. It was first launched on June 29, 2007, and has since been through several major hardware and software revisions. The iPhone, iPad, and iPod touch each run iOS (previously iPhone OS). Native iOS applications are written in Objective-C or in Swift since the release of iOS8, using the Cocoa Touch frameworks. These frameworks are distinct from Cocoa which is used exclusively for macOS development, though the two frameworks share many classes and features.
Most questions related to iPhone are also applicable to iPod touch devices since they support similar resolutions, input methods and features.
In all cases, questions that are specific to the features of a particular device should use the appropriate tag. Please refrain from questions regarding the App Store.
The iPhone has several hardware features and sensors which are accessible to native applications (and in some cases, to web apps via special APIs), including:
- 3-axis accelerometer
- 3-axis gyroscope
- Magnetometer
- GPS and A-GPS
- Proximity sensor
- Microphone, speaker, and headphone port
- Front (since iPhone 4) and rear cameras, and LED flash
- Lightning Dock Connector (iPhone 5 and above and iPod Touch 5th generation and above) and 30-pin dock connector (all others)
- Fingerprint recognition system (Touch ID introduced with iPhone 5s)
- Barometer (Introduced along with iPhone 6)
- Multi-Touch touchscreen display (3D Touch introduced with iPhone 6s)
- Dual Camera (iPhone 7 Plus, iPhone 8 Plus, iPhone X)
- Face recognition system (Face ID introduced with iPhone X)
While native iPhone and iPod touch applications use the Cocoa Touch frameworks and are developed using the Xcode IDE, and questions about classes that exist in both Cocoa and Cocoa Touch can accurately wear both tags, most questions should use only one or the other.
Models
- iPhone (1st generation)
- iPhone 3G
- iPhone 3GS
- iPhone 4
- iPhone 4S
- iPhone 5
- iPhone 5C
- iPhone 5S
- iPhone SE
- iPhone 6
- iPhone 6 Plus
- iPhone 6S
- iPhone 6S Plus
- iPhone 7
- iPhone 7 Plus
- iPhone 8
- iPhone 8 Plus
- iPhone X
- iPhone XS
- iPhone XS Max
- iPhone XR
- iPhone 11
- iPhone 11 Pro
- iPhone 11 Pro Max
Resources
Apple Official Documentations
- Swift
- Start Developing iOS Apps (Swift)
- Objective-C programming fundamentals
- Memory Management in iOS
- Automatic Reference Counting (ARC)
- Memory Management Programming Guide (an essential read, especially the Ownership Policy)
- Apple iOS Developer Library
- iOS Human Interface Guidelines
Books
- Apress - Beginning iOS 6 development
- Apress - Learn Objective-C on the Mac
- Oreilly - iPhone App Development The Missing Manual
- Objective-C Programming: The Big Nerd Ranch Guide
- iOS 7 by Tutorials
- Beginning iPhone SDK Programming with Objective-C
Blogs with Good Tutorials Collection
- https://www.raywenderlich.com/tutorials
- https://code.tutsplus.com/categories/iphone
- http://www.edumobile.org/ios/helloworld-example-in-xcode-4-iphone-os-4-3/
- http://iosdevelopertips.com/
FAQ
- How to check for an active Internet connection on iOS or OSX?
- iPhone development on Windows
- How To Make iPhone App compatible with multiple SDK (firmware) versions
- Can I embed a custom font in an iPhone application?
- How do I associate file types with an iPhone application?
- How to make a UITextField move up when keyboard is present?
- How do I create a basic UIButton programmatically?