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
11 answers

Passing parameters on button action:@selector

I want to pass the movie url from my dynamically generated button to MediaPlayer: [button addTarget:self action:@selector(buttonPressed:) withObject:[speakers_mp4 objectAtIndex:[indexPath row]] forControlEvents:UIControlEventTouchUpInside]; but…
Pascal Bayer
  • 2,615
  • 8
  • 33
  • 51
51
votes
9 answers

Can't upload archive to app store since yesterday

2 days before I successfully uploaded the archive for my application and my application is on app store, but yesterday and today when I upload the archive I see "Uploading the archive" message (with subtitle "Sending api usage to itunes connect") at…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
51
votes
2 answers

Gyroscope vs Accelerometer?

Now that iOS 4 is no longer NDA, I would like to know what Gyroscope has to offer over the Accelerometer for developers. Is there a difference in APIs? Other things?
Moshe
  • 57,511
  • 78
  • 272
  • 425
51
votes
5 answers

iPhone keyboard, Done button and resignFirstResponder

This is probably a dumb question, but I can't find the answer in the docs. Did the "Done" button on the pop-up keyboard always cause the keyboard to disappear? I see a lot of code around the web like this: - (BOOL)textFieldShouldReturn:(UITextField…
nevan king
  • 112,709
  • 45
  • 203
  • 241
51
votes
9 answers

UIKeyboardBoundsUserInfoKey is deprecated, what to use instead?

I'm working on an iPad app using 3.2 sdk. I'm dealing with obtaining the keyboard size to prevent my textfields from hidding behind it. I'm getting a Warning in Xcode -> UIKeyboardBoundsUserInfoKey is deprecated what should I use instead not to get…
Mikeware
  • 867
  • 2
  • 8
  • 12
51
votes
11 answers

What is the best way to enter numeric values with decimal points?

In my app users need to be able to enter numeric values with decimal places. The iPhone doesn't provides a keyboard that's specific for this purpose - only a number pad and a keyboard with numbers and symbols. Is there an easy way to use the latter…
Andrew Grant
  • 58,260
  • 22
  • 130
  • 143
51
votes
26 answers

Error while build project Xcode says : "you don't have permission"

I have downloaded one project from the internet and, when I am trying to run it/build it the XCode, XCode says : The file “PROJECT NAME” couldn’t be opened because you don’t have permission to view it. I have also put read/write permission to the…
jogshardik
  • 1,446
  • 1
  • 12
  • 23
51
votes
16 answers

iPhone not appearing in Develop menu in Safari

On my "Develop" menu, in Safari, the iPhone no longer appears after updating Safari to the latest version, making it impossible to inspect and debug sites and apps. I restarted the iPhone, killed and relaunched Safari, restarted my Mac too, but the…
Francesco Frapporti
  • 5,195
  • 4
  • 32
  • 39
51
votes
6 answers

Add UIPickerView in UIActionSheet from IOS 8 not working

I am adding UIPickerView to UIActionsheet but its working perfectally in ios 7 but not working in ios 8. Please help me to solve that. Here i attached screenshot for that. Thanks I am using following code for that. UIActionSheet…
Jignesh Patel
  • 755
  • 1
  • 8
  • 10
51
votes
1 answer

CABasicAnimation does not animate correctly when I update model layer

I'm currently implementing a CABasicAnimation that animates a CALayer transform property. Now, although I'm new to Core Animation, I have been able to gather through various blogs and articles such as objc.io that it is a very bad idea to use the…
user3546182
  • 565
  • 5
  • 6
51
votes
11 answers

How to view data stored in Core Data?

I'm creating a Core Data model for my application. I would like to be able to look inside it to see what I have stored in there. Is there an easier way than searching for the backing store (mine should be SQLite) and reading it from there? Doesn't…
Frank
  • 1,426
  • 1
  • 14
  • 14
51
votes
6 answers

Corner Radius property of UILabel is not working in iOS 7.1

I am setting the cornerRadius property for UILabel. Its working fine all version of iOS < 7.1. Following code i have used, UILabel *originaltagLbl = [[UILabel alloc]initWithFrame:CGRectMake(startX, startY, 100,30)]; [originaltagLbl…
Surfer
  • 1,370
  • 3
  • 19
  • 34
51
votes
3 answers

Showing/hiding navigation bar with smooth animation

I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation…
4thSpace
  • 43,672
  • 97
  • 296
  • 475
51
votes
5 answers

How do you setup Eclipse to work on iPhone development (instead of Xcode)?

Although I've been getting more and more familiar with Xcode while developing for the iPhone, there are times I just wished I had a better IDE, something like Eclipse. So I was wondering does anyone know how to migrate iPhone projects to Eclipse,…
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
51
votes
19 answers

Xcode error : Distill failed for unknown reasons

Does anybody know why this error happens on Xcode 5? Answer I had this problem when I accidentally renamed a .psd as a .png. Converting the image to an actual png instead of a Photoshop file fixed it for me.
Jun
  • 3,422
  • 3
  • 28
  • 58