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
270
votes
23 answers

How to get device make and model on iOS?

I was wondering if it's possible to determine what kind of iPhone (for example) the currentdevice is? I know it's possible to get the model through NSString *deviceType = [[UIDevice currentDevice] model]; which will just return whether I have an…
Nathan Fraenkel
  • 3,422
  • 4
  • 18
  • 21
268
votes
6 answers

Always pass weak reference of self into block in ARC?

I am a little confused about block usage in Objective-C. I currently use ARC and I have quite a lot of blocks in my app, currently always referring to self instead of its weak reference. May that be the cause of these blocks retaining self and…
the_critic
  • 12,720
  • 19
  • 67
  • 115
265
votes
8 answers

iOS 6 apps - how to deal with iPhone 5 screen size?

Possible Duplicate: How to develop or migrate apps for iPhone 5 screen resolution? I was just wondering with how should we deal with the iPhone 5 bigger screen size. As it has more pixels in height, things like GCRectMake that use coordinates…
jturolla
  • 6,596
  • 7
  • 26
  • 41
264
votes
3 answers

CSS submit button weird rendering on iPad/iPhone

I noticed that if I style my buttons with CSS using radius, colors and borders, they look good but in the iphone/ipad/ipod they look terrible...shouldn't be the same rendering as in Safari Desktop??
Francesco
  • 24,839
  • 29
  • 105
  • 152
257
votes
45 answers

Making a UITableView scroll when text field is selected

After a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right. I have a UITableView which is composed of custom cells. The cells are made of 5 text…
Jonathan
256
votes
16 answers

How can my iphone app detect its own version number?

I'm writing an iPhone app. It's already been published, but I would like to add a feature where its version number is displayed. I'd rather not have to do this manually with each version I release... Is there a way in objective-C to find out what…
cmos
255
votes
20 answers

App Store Connect Screenshots Sizes for all iOS (iPhone/iPad/Apple Watch) devices

I'm trying to submit a new application to the App Store but now Apple requires screenshots for iPhones of 4.7 inch and 5.5 inch. Anyone has these screenshot specifications (size)? I tried with: 640 x 1136 (portrait) 640 x 1096 (portrait) 1136 x…
EO Games and Apps
  • 2,988
  • 3
  • 16
  • 14
253
votes
18 answers

iPhone: How to get current milliseconds?

What is the best way to get the current system time milliseconds?
phil
252
votes
21 answers

How to show "Done" button on iOS number pad keyboard?

There is no "Done" button on the .numberPad Keyboard Type. When a user finishes entering numeric information in a text field, how can I make the number pad disappear? I could get a "Done" button by using the default keyboard, but then users would…
Chilly Zhong
  • 16,763
  • 23
  • 77
  • 103
251
votes
14 answers

What is App store screenshot size for 6.5" display?

Apparently, Apple documentation can't keep up with App Store changes. Until today, the biggest (optional) display size was a 5.8-Inch Super Retina Display with a resolution of 1125 x 2436 pixels. Currently, it is a 6.5-inch display, but the…
pcz
  • 2,629
  • 2
  • 11
  • 15
251
votes
18 answers

iOS app 'The application could not be verified' only on one device

I have two iphone devices( 4s and 5 ) connected to my computer and i am trying to install an application in both the devices. It installs pretty well in iphone 5 but it gives an error 'The application could not be verified.' when attempted to…
Sunil
  • 3,424
  • 2
  • 24
  • 25
247
votes
13 answers

How to compare two NSDates: Which is more recent?

I am trying to achieve a dropBox sync and need to compare the dates of two files. One is on my dropBox account and one is on my iPhone. I came up with the following, but I get unexpected results. I guess I'm doing something fundamentally wrong when…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
247
votes
20 answers

Make UINavigationBar transparent

How do you make a UINavigationBar transparent? Though I want its bar items to remain visible.
quano
  • 18,812
  • 25
  • 97
  • 108
247
votes
4 answers

How to create NSIndexPath for TableView

I need delete row 1 of a table in a function I have defined. In order to use deleteRowAtIndexPath you must use an IndexPath with a section and row defined. How can I create an indexpath like this? An array with the int {1} as its only member will…
Rubber Duck
  • 2,997
  • 2
  • 20
  • 25
244
votes
23 answers

How to load a UIView using a nib file created with Interface Builder

I'm trying to do something a bit elaborate, but something that should be possible. So here is a challenge for all you experts out there (this forum is a pack of a lot of you guys :) ). I'm creating a Questionnaire "component", which I want to load…
Gonso