Questions tagged [iphone]

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
  • iPhone 12
  • iPhone 12 mini
  • iPhone 12 Pro
  • iPhone 12 Pro Max
  • iPhone 13
  • iPhone 13 mini
  • iPhone 13 Pro
  • iPhone 13 Pro Max

Resources

Apple Official Documentations

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

FAQ


Related Tags

221329 questions
51
votes
18 answers

How can one develop iPhone apps in Java?

I was wondering if is it possible to develop iPhone applications using Java plus XMLV, which claims to cross-compile Java-based Android applications to native iPhone applications. Is XMLV a viable way to develop iPhone applications using Java? Here…
Brendan Lesniak
  • 2,271
  • 4
  • 24
  • 48
51
votes
3 answers

How to download image with AFNetworking 2.0?

Appareantly there is no AFImageRequestOperation, but only AFImageResponseSerializer and frankly I don't get it or maybe I'm just looking too long through AFNetworking site... Downloading images with previous AFNetworking was like a charm. I'd hate…
raistlin
  • 4,298
  • 5
  • 32
  • 46
51
votes
3 answers

When to use restoreCompletedTransactions for in-app purchases?

For a basic app with nonconsumable in-app purchases, has anyone figured out best practices for using SKPaymentQueue's restoreCompletedTransactions? Observations I know it's recommended to always register a transaction observer to receive pending…
otto
  • 2,230
  • 2
  • 26
  • 26
51
votes
12 answers

How do you determine spacing between cells in UICollectionView flowLayout

I have a UICollectionView with a flow layout and each cell is a square. How do I determine the spacing between each cells on each row? I can't seem to find the appropriate settings for this. I see there's a min spacing attributes on the nib file for…
adit
  • 32,574
  • 72
  • 229
  • 373
51
votes
2 answers

How do I know when safe to ignore __cxa_throw on an All Exceptions breakpoint?

I am on Xcode 4.5.1. I think this is relatively new behavior I am seeing. I prefer to develop and test my projects with the "All Exceptions" breakpoint enabled. I have been running into a scenario where I am loading thumbnail images to cells in a…
Del Brown
  • 928
  • 1
  • 7
  • 19
51
votes
4 answers

AdMob crashes with [GADObjectPrivate changeState:]: unrecognized selector

I have installed the AdMob SDK 6.2.0 (Xcode 4.5 (4G182) and I am testing on an iPhone 4S and the simulator). I followed the tutorial and just want to get AdMob showing a banner once. But it crashes on the last line: self.bannerView = [[GADBannerView…
david
  • 3,553
  • 4
  • 28
  • 39
51
votes
25 answers

UITextField for Phone Number

I was wondering how I can format the textField that I'm using for a phone number (ie like the "Add New Contact" page on the iPhone. When I enter in a new mobile phone, ex. 1236890987 it formats it as (123) 689-0987.) I already have the keyboard set…
None
51
votes
12 answers

AVAudioPlayer fade volume out

I have an AVAudioPlayer playing some audio (duh!) The audio is initiated when the user presses a button. When they release it I want the audio to fade out. I am using Interface builder...so I am trying to hook up a function on "touch up inside" that…
Jonathan
51
votes
9 answers

UIWebView to view self signed websites (No private api, not NSURLConnection) - is it possible?

There's a load of questions which ask this: Can I get UIWebView to view a self signed HTTPS website? And the answers always involve either: Use the private api call for NSURLRequest: allowsAnyHTTPSCertificateForHost Use NSURLConnection instead and…
Stretch
  • 3,669
  • 2
  • 28
  • 40
51
votes
4 answers

Stack trace or more info on unhandled exception in Xcode/iPhone

Excuse my ignorance, but something's been bugging me about the Xcode debugger when running iPhone applications in the iPhone Simulator. Sometimes, when I mess something up in Interface Builder, I get an unhandled exception at runtime and I get…
Philippe Leybaert
  • 168,566
  • 31
  • 210
  • 223
51
votes
10 answers

Apple PNS (push notification services) sample code

Is there a sample project showing how to use APNS on the IPhone and how to set up things? I'm currently looking at the documentation but it would be nice to have some working code to pick apart and see how it all works together? I can't seem to find…
froh42
  • 5,190
  • 6
  • 30
  • 42
50
votes
9 answers

removing provisioning profile from xcode

How can I remove a previously installed development provisioning profile from xcode?
ebaccount
  • 5,051
  • 11
  • 43
  • 47
50
votes
6 answers

iPhone - Setting background on UITableViewController

Is there any way to set a background view on a UITableViewController? I try with the code I am using on a UIViewController, but the view comes over all the contents of the table view. If I add the background view in the cellForRowAtIndexPath-method,…
Hans Espen
  • 1,127
  • 6
  • 14
  • 22
50
votes
8 answers

How to download a file and save it to the documents directory with AFNetworking?

I am using the AFNetworking library. I can't figure out how to download a file and save it to the documents directory.
iamsmug
  • 1,517
  • 4
  • 15
  • 25
50
votes
3 answers

iOS 5: Curious about UIAppearance

On the tech talk 2011 I saw a speech about the new UIAppearance protocol. There is not a lot of documentation out there yet. I will shortly summarize what I remember to explain where my question is coming from: About UIAppearance: So far you had…
d.ennis
  • 3,445
  • 2
  • 28
  • 36