Questions tagged [ios]

iOS is the mobile operating system running on the Apple iPhone, iPod touch, and iPad. Use this tag [ios] for questions related to programming on the iOS platform. Use the related tags [objective-c] and [swift] for issues specific to those programming languages.

iOS is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that presently powers many of the company's mobile devices, including the iPhone, iPad, and iPod Touch.

It should not be confused with i5/OS, which is one of IBM's operating systems for the IBM Power Systems (originally AS/400), or with Cisco's IOS (Inter-network Operating System).

iOS Latest Stable Release: iOS 14.3 (18C66) released on December 14, 2020

Latest Preview: iOS 14.4 beta 1 (18D5030e) released on December 16, 2020

iOS is a derivative of Apple's OSX desktop operating system, with which it shares many (but not all) common frameworks and other components. These include Cocoa Touch (the counterpart of the OS X Cocoa UI Framework), the Mach/Darwin/XNU kernel and code from the Berkeley Software Distribution (BSD).

Applications for iOS are written for the Cocoa Touch framework (as opposed to OS X's Cocoa framework) using the same Xcode IDE for official use (i.e. for submitting applications to Apple's App Store) or using unofficial (mostly command-line only) toolchains for various operating systems (including Linux) for unofficial/jailbroken development. OS X is based on the Darwin-OS foundation, itself based on several Unix descendants. On June 2nd, 2014, Apple announced a new language, Swift, which could be used to develop apps for iOS. Swift was in beta until September 9th, 2014, and is, since September 17th, 2018, at version 4.2.0.

Each iOS application runs in its own secure sandbox to prevent (accidentally or intentionally) altering other applications, the operating system, or any other data. Since iOS 8, an iOS application can have extensions that extend custom functionality beyond the application. iOS is optimized for the power, graphics, processor, and memory constraints of mobile devices.

The user interface of iOS is based on the concept of direct manipulation through multi-touch gestures. Interface control elements consist of sliders, switches, and buttons, all included in Apple's UIKit Framework. Interaction with the OS includes gestures such as swipe, tap, pinch, and reverse pinch, all of which have specific definitions within the context of the iOS operating system and its multi-touch interface.

Internal accelerometers and gyroscopes can be used by applications to respond to the user shaking the device (one application is the undo command) or rotating it in three dimensions (one common result is switching from portrait to landscape mode or autorotation).

Apple initially adapted features from OS X to create iOS, but that cycle is now bidirectional. Many features on OS X 10.7 OSX Lion were implemented first in iOS, including application sandboxing, an OS X App Store (and the implied widespread third-party app code signing), the content-centric ("natural") scrolling direction, along with AV Foundation, Core Location, and a few other frameworks.

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It includes almost ten thousand libraries to help programmers scale projects. A popular alternative is Carthage, which is a decentralized dependency manager, meaning that it does not store a central list of available projects.

Use the tag for questions about Cisco's IOS operating system for Cisco network routers.

Please follow the article My App Crashed, Now What? by Ray Wenderlich, before posting any questions relating to app crashes. It explains how to properly debug an iOS app. It's pointless to ask questions relating to crashes when you don't have a proper backtrace and exception message.

Before you ask about custom controls: I want this type of control. Please visit cocoacontrols once. You will get lots of custom controls, animation, libraries and much more which is available in Swift and Objective-C.

Before asking about a topic, just search it in https://developer.apple.com/documentation/ also, which is the developer documentation provided by the apple which covers a lot of information regarding iOS development.


Resources


Chat Rooms

Chat about iOS with other Stack Overflow users


If you are moving from Objective-C to Swift, but you don't know anything about Swift, then you can convert your Objective-C code/project to Swift. Use the following third party link.

Related Tags

Platforms:

Programming languages:

IDE:

Frameworks & extensions:

Distribution:

656272 questions
718
votes
14 answers

Xcode 6: Keyboard does not show up in simulator

The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard? It used to work but now it doesn't - I don't know what I might have clicked by accident... any tips would be appreciated!
Katsu
  • 7,193
  • 3
  • 10
  • 7
704
votes
45 answers

This action could not be completed. Try Again (-22421)

I am trying to upload an Apple TV App to the App Store for testing purposes, but I got the issue: This Action could not be completed. Try Again (-22421) as in the below image: So what can I do?
Nimisha Ranipa
  • 8,214
  • 2
  • 11
  • 28
680
votes
7 answers

Version vs build in Xcode

I have an app that I developed with Xcode 3 and recently started editing with Xcode 4. In the target summary I have the iOS application target form with fields: identifier, version, build, devices, and deployment target. The version field is blank…
chris
  • 15,435
  • 8
  • 34
  • 38
671
votes
43 answers

iOS 8 UITableView separator inset 0 not working

I have an app where the UITableView's separator inset is set to custom values - Right 0, Left 0. This works perfectly in iOS 7.x, however in iOS 8.0 I see that the separator inset is set to the default of 15 on the right. Even though in the xib…
user3570727
  • 9,835
  • 4
  • 15
  • 23
666
votes
30 answers

How do I test if a string is empty in Objective-C?

How do I test if an NSString is empty in Objective-C?
Jamey McElveen
  • 17,547
  • 25
  • 86
  • 126
663
votes
71 answers

Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7

Starting in iOS7, there is additional space at the top of my UITableView's which have a style UITableViewStyleGrouped. Here is an example: The tableview starts at the first arrow, there are 35 pixels of unexplained padding, then the green header is…
esilver
  • 25,374
  • 21
  • 112
  • 159
628
votes
34 answers

Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy

Just started using Xcode 4.5 and I got this error in the console: Warning: Attempt to present < finishViewController: 0x1e56e0a0 > on < ViewController: 0x1ec3e000> whose view is not in the window hierarchy! The view is still being presented and…
Kyle Goslan
  • 9,898
  • 7
  • 23
  • 38
622
votes
52 answers

Xcode 6 Bug: Unknown class in Interface Builder file

I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message Unknown class X in Interface Builder file. It crashes because supposedly Xcode can't find my custom classes that I have linked in my Storyboard but it shows that…
Epic Byte
  • 33,169
  • 12
  • 40
  • 88
618
votes
6 answers

Send and receive messages through NSNotificationCenter in Objective-C?

I am attempting to send and receive messages through NSNotificationCenter in Objective-C. However, I haven't been able to find any examples on how to do this. How do you send and receive messages through NSNotificationCenter?
Cathy
609
votes
32 answers

iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

This crash has been a blocking issue I used the following steps to reproduce the issue: Create a Cocoa Touch Framework project Add a swift file and a class Dog Build a framework for device Create a Single View application in Swift Import framework…
vladof81
  • 24,145
  • 9
  • 35
  • 40
607
votes
9 answers

What does the NS prefix mean?

Many classes in Cocoa/Cocoa Touch have the NS prefix. What does it mean?
Martin08
  • 19,490
  • 20
  • 80
  • 91
598
votes
22 answers

UITextField text change event

How can I detect any text changes in a textField? The delegate method shouldChangeCharactersInRange works for something, but it did not fulfill my need exactly. Since until it returns YES, the textField texts are not available to other observer…
karim
  • 14,810
  • 7
  • 55
  • 92
593
votes
6 answers

What are Unwind segues for and how do you use them?

iOS 6 and Xcode 4.5 has a new feature referred to as "Unwind Segue": Unwind segues can allow transitioning to existing instances of scenes in a storyboard In addition to this brief entry in Xcode 4.5's release notes, UIViewController now seem to…
Imre Kelényi
  • 21,863
  • 5
  • 31
  • 44
592
votes
17 answers

How to tell if UIViewController's view is visible

I have a tab bar application, with many views. Is there a way to know if a particular UIViewController is currently visible from within the UIViewController? (looking for a property)
Rob Bonner
  • 8,650
  • 8
  • 32
  • 52
587
votes
21 answers

Giving UIView rounded corners

My login view has a subview which has a UIActivityView and a UILabel saying "Signing In…". This subview has corners which aren't rounded. How can I make them round? Is there any way to do it inside my xib?
itsaboutcode
  • 21,936
  • 42
  • 103
  • 153