explaingit

nytimes/objective-c-style-guide

5,824Audience · developerComplexity · 1/5Setup · easy

TLDR

The deprecated Objective-C coding style guide used by The New York Times iOS engineering team, covering naming, formatting, and language conventions to keep legacy iOS codebases consistent and readable.

Mindmap

mindmap
  root((NYT ObjC Guide))
    What it covers
      Naming conventions
      Formatting rules
      Language features
    Rules
      Indentation style
      Curly brace placement
      Dot vs bracket notation
    Audience
      iOS developers
      Legacy ObjC teams
    Status
      Deprecated
      Swift era reference
      MIT-style release
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Adopt or adapt NYT's Objective-C style conventions for a legacy iOS project to improve code consistency.

USE CASE 2

Use as a reference when reviewing code style in an existing Objective-C codebase maintained by multiple engineers.

USE CASE 3

Understand industry-standard Objective-C naming and formatting norms from a major engineering team's documented practices.

Tech stack

Objective-C

Getting it running

Difficulty · easy Time to first run · 5min

Documentation only, no installation needed, read the Markdown files directly on GitHub.

License terms are not described in the explanation, the guide was publicly released for other teams to adopt or adapt.

In plain English

Note: this repository has been deprecated and is no longer maintained. This repository contains the Objective-C coding style guide that the iOS engineering teams at The New York Times used internally. Objective-C is the programming language Apple used for iOS and Mac app development before Swift became the dominant option. Style guides like this one exist so that everyone on a team writes code in a consistent way, making it easier for engineers to read and review each other's work. The guide covers a wide range of formatting and convention decisions. It specifies things like how many spaces to use for indentation, where to place curly braces in conditional statements, how to name variables and constants so their type and purpose are clear, and when to use certain language features like dot notation versus bracket notation for accessing object properties. It also covers how to handle errors, how to define enumerations and bitmasks, and how to structure Xcode project files. Each rule is explained with a short rationale and paired code examples showing the preferred style and a counter-example showing what to avoid. The guide uses the terms MUST, SHOULD, and RECOMMENDED to signal which rules are strict requirements and which are softer preferences, following the same conventions used in internet standards documents. The guide was publicly released so that other iOS development teams could adopt it, adapt it, or use it as a reference when building their own conventions. It drew heavily from Apple's own official documentation on Objective-C programming and Cocoa coding guidelines. The project is no longer active, as Objective-C has largely been succeeded by Swift for new iOS development.

Copy-paste prompts

Prompt 1
I'm maintaining a legacy Objective-C iOS app. Based on the NYT style guide, how should I name private properties and local variables to keep them readable and distinct from public APIs?
Prompt 2
Show me the NYT Objective-C style guide rules for when to use dot notation versus bracket notation to access object properties, with a correct and incorrect example of each.
Prompt 3
I'm defining an enum in Objective-C. What does the NYT style guide say about naming enum values and which NS_ENUM macro to use?
Prompt 4
I need consistent error handling in an Objective-C codebase. What pattern does the NYT style guide recommend for checking NSError parameters and surfacing failures to callers?
Prompt 5
Walk me through the NYT style guide rules for structuring an Objective-C class file, what goes in the header, what stays in the implementation, and how to order the sections.
Open on GitHub → Explain another repo

← nytimes on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.