Programming Language


Objective-C (programminglanguage)
Full NameObjective-C
Short NameObjective-C
DescriptionObjective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language

What is Objective-C?

Objective-C is a programming language that was developed in the 1980s and is commonly used for developing software for macOS and iOS. It is a strict superset of C, meaning that any valid C code is also valid Objective-C code.

What are some features of Objective-C?

Objective-C includes features such as dynamic binding, message passing, and protocols, which allow for flexible and dynamic object-oriented programming. It also includes support for categories, which allow for adding functionality to existing classes, and blocks, which are similar to anonymous functions.

What is the difference between Objective-C and Swift?

Objective-C and Swift are two different programming languages that are used for developing software for macOS and iOS. Objective-C is an older language that has been used for many years, while Swift is a newer language that was introduced by Apple in 2014. Swift is designed to be easier to learn and use than Objective-C, and includes features such as type inference and optionals that make it safer and more expressive.

How is Objective-C used in iOS development?

Objective-C is commonly used in iOS development to create native apps for iPhones, iPads, and other iOS devices. It is used to write the code that controls the user interface, interacts with the device's hardware, and communicates with external APIs and databases.

What are some popular Objective-C frameworks and libraries?

Some popular Objective-C frameworks and libraries for iOS development include UIKit, Core Data, and Cocoa Touch.

Can Objective-C code be used in Swift projects?

Yes, Objective-C code can be used in Swift projects using bridging headers. This allows for interoperability between Objective-C and Swift code, which is useful for developers who are migrating from Objective-C to Swift or who are working on projects that include both languages.

Is Objective-C still relevant today?

Objective-C is still relevant today, particularly for developers who are maintaining legacy code or who are working on macOS and iOS projects that were developed using Objective-C. However, Swift is increasingly becoming the preferred language for new iOS and macOS projects, as it is easier to learn and use than Objective-C and includes many modern language features.

Snippet from Wikipedia: Objective-C

Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTSTEP operating system. Due to Apple macOS’s direct lineage from NeXTSTEP, Objective-C was the standard programming language used, supported, and promoted by Apple for developing macOS and iOS applications (via their respective APIs, Cocoa and Cocoa Touch) until the introduction of the Swift programming language in 2014.

Objective-C programs developed for non-Apple operating systems or that are not dependent on Apple's APIs may also be compiled for any platform supported by GNU GCC or LLVM/Clang.

Objective-C source code 'messaging/implementation' program files usually have .m filename extensions, while Objective-C 'header/interface' files have .h extensions, the same as C header files. Objective-C++ files are denoted with a .mm file extension.

GitHub Topics

Objective-C builds on the foundations of ANSI C. Compared to other object-oriented languages based on C, Objective-C is very dynamic. Dynamism enables the construction of sophisticated development tools. Since Objective-C incorporates C, one gets all the benefits of C when working within Objective-C.

#import <stdio.h>

int main (int argc, const char *argv[])
    printf ("Hello, world!\n");
    return 0;

Source: Wikibooks

## ToDo ##

  • Object-Oriented Programming (OOP)
  • Classes
  • Inheritance
  • Polymorphism
  • Categories
  • Protocols
  • Dynamic binding
  • Memory management
  • ARC (Automatic Reference Counting)
  • Properties
  • Methods
  • Blocks
  • Selectors
  • Foundation framework
  • Cocoa Touch framework
  • UIKit framework
  • Multithreading
  • Debugging
  • Xcode IDE
  • Interface Builder

See also: Programming Languages

  • dev/objective-c.txt
  • Last modified: 2023/05/01 17:26
  • by Henrik Yllemo