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
1265
votes
42 answers

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows? The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not…
ryan
  • 5,039
  • 13
  • 35
  • 42
907
votes
25 answers

Xcode error "Could not find Developer Disk Image"

When attempting to run a build on a connected iOS device in Xcode I get the error: Could not find Developer Disk Image I saw that there was a public beta for Xcode, so I installed it. One of the new features is that you don't need to have a…
Nathan Kramer
  • 9,180
  • 3
  • 11
  • 8
844
votes
39 answers

Disable Auto Zoom in Input "Text" tag - Safari on iPhone

I made an HTML page that has an tag with type="text". When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?
Eduardo Montenegro
  • 8,449
  • 3
  • 16
  • 3
574
votes
21 answers

Is it possible to disable the network in iOS Simulator?

I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the Internet. I don't see the issues in the simulator, just on the device, so I'd like to reproduce the network and connectivity…
Paul Hammond
  • 6,226
  • 3
  • 17
  • 10
563
votes
24 answers

How to lose margin/padding in UITextView

I have a UITextView in my iOS application, which displays a large amount of text. I am then paging this text by using the offset margin parameter of the UITextView. My problem is that the padding of the UITextView is confusing my calculations as it…
sniurkst
  • 7,212
  • 5
  • 30
  • 30
534
votes
32 answers

How to determine the current iPhone/device model?

Is there a way to get the device model name (iPhone 4S, iPhone 5, iPhone 5S, etc) in Swift? I know there is a property named UIDevice.currentDevice().model but it only returns device type (iPod touch, iPhone, iPad, iPhone Simulator, etc). I also…
The Mach System
  • 6,703
  • 3
  • 16
  • 20
529
votes
20 answers

Take screenshots in the iOS simulator

I want to take a screenshot of my iOS application when it is running in the simulator, and save the screenshot on my Mac. How can I do this?
Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188
510
votes
35 answers

How to navigate through textfields (Next / Done Buttons)

How can I navigate through all my text fields with the "Next" Button on the iPhone Keyboard? The last text field should close the Keyboard. I've setup the IB the Buttons (Next / Done) but now I'm stuck. I implemented the textFieldShouldReturn action…
phx
  • 5,927
  • 4
  • 24
  • 24
504
votes
30 answers

How to develop or migrate apps for iPhone 5 screen resolution?

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). What is required to develop new or transition already existing applications to the new screen size? What should we keep in mind to make applications…
Lukasz
  • 19,816
  • 17
  • 83
  • 139
499
votes
11 answers

Missing Compliance status in TestFlight

When I added my latest build for internal testing with TestFlight, I saw that it had a "Missing Compliance" status. Is this a major problem? Why does this appear? How can I resolve this issue?
Chandan Jee
  • 5,440
  • 4
  • 16
  • 24
496
votes
8 answers

iPad Multitasking support requires these orientations

I'm trying to submit my universal iOS 9 apps to Apple (built with Xcode 7 GM) but I receive this error message for the bundle in iTunes Connect, just when I select Submit for Review: Invalid Bundle. iPad Multitasking support requires these…
Cosmin
  • 6,623
  • 3
  • 26
  • 28
484
votes
4 answers

Ignore Xcode warnings when using Cocoapods

I use quite a lot third party libraries which have many warnings in it, after the latest Xcode updates. (for example the Facebook SDK pod) Now all these warnings are shown in my Xcode on the place I want to see my own warnings or errors. Is there…
KrauseFx
  • 11,551
  • 7
  • 46
  • 53
472
votes
14 answers

Does my application "contain encryption"?

I'm uploading a binary for the first time. iTunes Connect has asked me: Export laws require that products containing encryption be properly authorized for export. Failure to comply could result in severe penalties. For further information,…
Steven Fisher
  • 44,462
  • 20
  • 138
  • 192
424
votes
28 answers

Detect a finger swipe through JavaScript on the iPhone and Android

How can you detect that a user swiped his finger in some direction over a web page with JavaScript? I was wondering if there was one solution that would work for websites on both the iPhone and an Android phone.
827
  • 4,864
  • 4
  • 19
  • 24
420
votes
41 answers

Xcode "Device Locked" When iPhone is unlocked

When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it's not locked at all. How do I fix this?
Faisal Syed
  • 4,271
  • 2
  • 11
  • 10
1
2 3
99 100