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
1023
votes
14 answers

Constants in Objective-C

I'm developing a Cocoa application, and I'm using constant NSStrings as ways to store key names for my preferences. I understand this is a good idea because it allows easy changing of keys if necessary. Plus, it's the whole 'separate your data from…
Allyn
  • 19,710
  • 16
  • 55
  • 68
992
votes
12 answers

How do I animate constraint changes?

I'm updating an old app with an AdBannerView and when there is no ad, it slides off screen. When there is an ad it slides on the screen. Basic stuff. Old style, I set the frame in an animation block. New style, I have a IBOutlet to the auto-layout…
DBD
  • 22,215
  • 12
  • 57
  • 84
929
votes
11 answers

How do I convert an NSString value to NSData?

How do I convert an NSString value to NSData?
anish
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
872
votes
36 answers

How to check iOS version?

I want to check if the iOS version of the device is greater than 3.1.3 I tried things like: [[UIDevice currentDevice].systemVersion floatValue] but it does not work, I just want a: if (version > 3.1.3) { } How can I achieve this?
John
  • 8,739
  • 3
  • 13
  • 4
843
votes
11 answers

Xcode 7 error: "Missing iOS Distribution signing identity for ..."

I tried to upload my App to iTunes Connect resp. AppStore and got the following error: Failed to locate or generate matching signing assets Xcode attempted to locate or generate matching signing assets and failed to do so because of the following…
Awsed
  • 8,574
  • 5
  • 22
  • 25
780
votes
32 answers

Can I embed a custom font in an iPhone application?

I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit elements like UILabel. Is this possible?
Airsource Ltd
  • 31,336
  • 13
  • 69
  • 74
777
votes
14 answers

Xcode process launch failed: Security

I have been developing an app for 1 or 2 weeks now and just yesterday I have updated my iPhone 5S to the iOS 8 GM. Everything worked fine and I could test on my device as well until I deleted the app from my phone and wanted to build again. The…
Tom Spee
  • 8,939
  • 4
  • 26
  • 47
772
votes
32 answers

Loaded nib but the 'view' outlet was not set

I added a new nib file to my project, and tried to load it. However, when I click on the toolbar icon that is supposed to take me to the view that I created, I get an NSInternalInconsistencyException with the message: Terminating app due to…
John
  • 10,219
  • 7
  • 24
  • 30
755
votes
19 answers

How do you trigger a block after a delay, like -performSelector:withObject:afterDelay:?

Is there a way to call a block with a primitive parameter after a delay, like using performSelector:withObject:afterDelay: but with an argument like int/double/float?
Egil
  • 7,881
  • 4
  • 15
  • 6
754
votes
19 answers

How do I create delegates in Objective-C?

I know how delegates work, and I know how I can use them. But how do I create them?
Andy Jacobs
  • 14,897
  • 13
  • 57
  • 89
747
votes
34 answers

Eliminate extra separators below UITableView

When I set up a table view with 4 rows, there are still extra separators lines (or extra blank cells) below the filled rows. How would I remove these cells?
RoundOutTooSoon
  • 9,281
  • 8
  • 29
  • 49
737
votes
62 answers

Placeholder in UITextView

My application uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can set for an UITextField. How to do this? Edit: Use this cocoapod: https://cocoapods.org/pods/UITextView+Placeholder
user142019
732
votes
25 answers

How to link to apps on the app store

I am creating a free version of my iPhone game. I want to have a button inside the free version that takes people to the paid version in the app store. If I use a standard…
matt
  • 1,717
  • 4
  • 18
  • 26
728
votes
13 answers

Hide strange unwanted Xcode logs

When using the Xcode 8+ and creating a new blank project, the following logs appear when running the application: 2016-06-13 16:33:34.406093 TestiOS10[8209:100611] bundleid: com.appc.TestiOS10, enable_level: 0, persist_level: 0,…
Hans Knöchel
  • 10,974
  • 8
  • 25
  • 46