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
49
votes
8 answers

Detecting if iOS app is run in debugger

I set up my application to either send debugging output to console or a log file. Now, I'd like to decide with in the code whether it is run in the debugger (or simulator) and have thus a console window where I would like to read the output…
Axel
  • 1,646
  • 1
  • 16
  • 28
49
votes
3 answers

core data - the primary key id of a row in the database

Suppose I have a list of books stored in Core Data. I want to search for a book by it's primary key ID. I know the sqlite file created by Core Data has an ID column in each table, but this doesn't seem to be exposed to me in anyway. Does anyone have…
WoodenKitty
  • 6,101
  • 8
  • 47
  • 70
49
votes
7 answers

Extra bottom space/padding on iPhone X?

On the iPhone X in portrait mode, if you set a bottom constraint to safe area to 0, you will end up with an extra space at the bottom of the screen. How do you get programmatically the height of this extra padding ? I managed to manually determine…
Stanislas Dousset
  • 990
  • 1
  • 7
  • 21
49
votes
5 answers

Architectural and design question about uploading photos from iPhone app and S3

I want to allow users of an iPhone app to upload photos and use Amazon S3. There are 2 ways I see going about this: Upload from iPhone to my server, which proxies it then to Amazon S3. Upload from iPhone direct to S3 For option 1, the security is…
TMC
  • 8,018
  • 12
  • 49
  • 70
49
votes
12 answers

How to draw a "speech bubble" on an iPhone?

I'm trying to get a "speech bubble" effect similar to the one in Mac OS X when you right click on something in the dock. Here's what I have now: I need to get the "triangle" part of the lower portion. Is there any way I can draw something like…
sudo rm -rf
  • 28,958
  • 19
  • 100
  • 160
49
votes
4 answers

How to pass userInfo in NSNotification?

I am trying to send some data using NSNotification but get stuck. Here is my code: // Posting Notification NSDictionary *orientationData; if(iFromInterfaceOrientation == UIInterfaceOrientationLandscapeRight) { orientationData = [NSDictionary…
Abhinav
  • 36,284
  • 39
  • 178
  • 301
49
votes
12 answers

How to get screen size using code on iOS?

How to get the iPhone screen size to give calculation?
haisergeant
  • 1,081
  • 2
  • 13
  • 31
49
votes
5 answers

How do I save user preferences for my iPhone app?

The question title pretty much gives it away - I'd like my app to remember a few things. It's some sort of calculator, so it should save the last used values and some user selectable settings. Basically I'd like to save a handful of floats and BOOLs…
Toastor
  • 8,890
  • 4
  • 47
  • 79
49
votes
2 answers

How to change my app’s developer name on Apple's App Store?

When I paid Apple the $99 to open my developer account, my company was not yet legally registered, so I used my name. But now my startup is a registered company and I need to have the company’s name showing as the developer. Does anyone know how to…
Katedral Pillon
  • 14,266
  • 20
  • 87
  • 182
49
votes
5 answers

Debug Ionic app on IOS?

My HTML5 app is packaged by Ionic (using Cordova) and loads onto my iPhone like a normal app. Can I debug whilst connected to the device? I know with Android you have logcat and in the browser I have dev tools but there are differences between the…
Ben Taliadoros
  • 6,068
  • 15
  • 54
  • 84
49
votes
21 answers

Error opening iOS Simulator with iOS 8 beta version: "Unable to boot the iOS Simulator"

I recently installed the beta of Xcode Version 6 in OS X Mavericks, with which comes the iOS simulator for iOS 8. I've managed to successfully run from Xcode 6 beta on a device with iOS 8 Beta, but opening the simulator always get the same error I…
dayanruben
  • 961
  • 1
  • 12
  • 21
49
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
  • 545
  • 5
  • 6
49
votes
2 answers

Objective-C - When to use 'self'

This is unmodified code from Apple's iPhone 'Utility Aplication' template: - (void)applicationDidFinishLaunching:(UIApplication *)application { MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; …
Joe
  • 601
  • 1
  • 5
  • 9
49
votes
3 answers

How to read the Bundle version from PList?

Is there a way to read the app's bundled plist file, I am wanting to pull the value for Bundle version.
Rob Bonner
  • 8,650
  • 8
  • 32
  • 52
49
votes
8 answers

UISegmentedControl deselect (make none of the segments selected)

in fact the title contains my question. I have a UISegmentedControl, and need to deselect currently selected tab. I tried: [menu setSelectedSegmentIndex:-1]; menu being the UBOutlet for uisegmentedcontrol but this gives me exception. anyone have…
dusker
  • 796
  • 2
  • 7
  • 13
1 2 3
99
100