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

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

221116 questions
1218
votes
41 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
  • 4,893
  • 13
  • 32
  • 42
889
votes
24 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,000
  • 3
  • 9
  • 8
635
votes
36 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
  • 6,359
  • 3
  • 13
  • 3
521
votes
22 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
  • 6,752
  • 5
  • 28
  • 30
498
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,014
  • 15
  • 77
  • 136
496
votes
34 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,767
  • 4
  • 21
  • 22
494
votes
17 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
  • 22,310
  • 34
  • 106
  • 187
472
votes
20 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
  • 5,208
  • 3
  • 15
  • 10
456
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
  • 10,612
  • 5
  • 42
  • 52
451
votes
30 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
  • 5,790
  • 3
  • 12
  • 20
419
votes
15 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
  • 43,056
  • 20
  • 131
  • 184
412
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
  • 5,543
  • 3
  • 24
  • 27
408
votes
19 answers

How do I make an HTTP request in Swift?

I read The Programming Language Swift by Apple in iBooks, but cannot figure out how to make an HTTP request (something like cURL) in Swift. Do I need to import Obj-C classes or do I just need to import default libraries? Or is it not possible to…
Dicky Tsang
  • 5,425
  • 3
  • 17
  • 18
392
votes
11 answers

Turn off iPhone/Safari input element rounding

My website renders well on the iPhone/Safari browser, with one exception: My text input fields have a weird rounded style which doesn't look good at all with the rest of my website. Is there a way to instruct Safari (via CSS or metadata) not to…
Alex
  • 71,233
  • 79
  • 245
  • 337
388
votes
34 answers

How to dismiss keyboard for UITextView with return key?

In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'. I can add a button and use [txtView resignFirstResponder] to hide the…
Chilly Zhong
  • 16,373
  • 23
  • 75
  • 103
1
2 3
99 100