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
290
votes
10 answers

Build fat static library (device + simulator) using Xcode and SDK 4+

It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad. However, Apple has no documentation on this that I can find, and Xcode's default templates are NOT configured to do this. I'm…
Adam
  • 32,900
  • 16
  • 126
  • 153
290
votes
21 answers

How to add line break for UILabel?

Let see that I have a string look like this: NSString *longStr = @"AAAAA\nBBBBB\nCCCCC"; How do I make it so that the UILabel display the message like this AAAAA BBBBB CCCCC I don't think \n is recognized by UILabel, so is there…
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
287
votes
6 answers

String replacement in Objective-C

How to replace a character is a string in Objective-C?
4thSpace
  • 43,672
  • 97
  • 296
  • 475
286
votes
8 answers

Processing Symbol Files in Xcode

I was wondering if anyone could tell me what Xcode is actually doing when it says: "Processing Symbol Files" after plugging in your device?
Woodstock
  • 22,184
  • 15
  • 80
  • 118
285
votes
38 answers

Detect if the device is iPhone X

My iOS app uses a custom height for the UINavigationBar which leads to some problems on the new iPhone X. Does someone already know how to reliable detect programmatically (in Objective-C) if an app is running on iPhone X? EDIT: Of course checking…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
285
votes
6 answers

What does ENABLE_BITCODE do in xcode 7?

I have a problem with the embedded bitcode term. What is embedded bitcode? When to enable, ENABLE_BITCODE in new Xcode? What happens to the binary when enabled, ENABLE_BITCODE in Xcode 7?
damithH
  • 5,148
  • 2
  • 27
  • 31
281
votes
35 answers

Xcode 8 shows error that provisioning profile doesn't include signing certificate

Xcode 8 shows error that provisioning profile doesn't include signing certificate. This issue is with Xcode-8 only with Xcode 7, same provisioning profile showing related identified certificate.
Satish Mavani
  • 4,897
  • 2
  • 20
  • 30
281
votes
14 answers

Cocoa Touch: How To Change UIView's Border Color And Thickness?

I saw in the inspector that I can change the background color, but I'd like to also change the border color and thickness, is this possible?
Shai UI
  • 50,568
  • 73
  • 204
  • 309
280
votes
21 answers

Aligning text and image on UIButton with imageEdgeInsets and titleEdgeInsets

Historic question. Note that 15 years later, .padding is the space between the image and label. Original question: I would like to place an icon left of the two lines of text such that there's about 2-3 pixels of space between the image and the…
Justin Galzic
  • 3,951
  • 6
  • 28
  • 39
279
votes
21 answers

Where does the iPhone Simulator store its data?

I have a SQLite DB that I'm using to store app data, and I could do with taking a look inside it to debug a problem I'm having - but where does the iPhone Simulator store its data, typically?
Codebeef
  • 43,508
  • 23
  • 86
  • 119
277
votes
6 answers

Warning: The Copy Bundle Resources build phase contains this target's Info.plist file

I've separated a project into two builds and given each of them a plist file. Everything works fine, but I keep getting this build warning: Warning: The Copy Bundle Resources build phase contains this target's Info.plist file…
nevan king
  • 112,709
  • 45
  • 203
  • 241
276
votes
17 answers

Where are iOS simulator screenshots stored?

I have saved some screenshots in the iPhone Simulator running iOS 5, but I can't find them. I had this problem before, and it took me frickin' ages to find them in the file system. Is this so simple that I am just a dullard, or does no-one use this…
Flyingkiwi
  • 3,066
  • 3
  • 15
  • 17
275
votes
7 answers

How to store custom objects in NSUserDefaults

Alright, so I've been doing some poking around, and I realize my problem, but I don't know how to fix it. I have made a custom class to hold some data. I make objects for this class, and I need to them to last between sessions. Before I was…
Ethan Mick
  • 9,517
  • 14
  • 58
  • 74
270
votes
10 answers

How to disable scrolling in UITableView table when the content fits on the screen

I have a few (grouped style) tables in my iphone app (only on part of the screen and added with Interface Builder though, not subclassed from UITableViewController) that 80% of the time are small and will fit on the screen. When the table fits on…
Ginny
  • 3,111
  • 2
  • 18
  • 12
270
votes
10 answers

How much does it cost to develop an iPhone application?

How much can a developer charge for an iPhone app like Twitterrific? I want to know this because I need such an application with the same functionality for a new community website. I can do Ruby but have no experience with Objective-C. So it would…
user27815
  • 2,339
  • 3
  • 14
  • 6