Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Spotify Objective-C Coding Style

Spotify Objective-C Coding Style

NOASSERTION

Spotify's official Objective-C and Objective-C++ coding style guide for iOS development.

GitHubGitHub
244 stars35 forks0 contributors

What is Spotify Objective-C Coding Style?

Spotify Objective-C Coding Style is a style guide that documents the coding conventions for Objective-C and Objective-C++ code used in Spotify's iOS client. It provides detailed rules on formatting, naming, documentation, and best practices to ensure code consistency and quality across the iOS codebase.

Target Audience

iOS developers at Spotify and Objective-C developers seeking to adopt a well-structured, industry-tested style guide for their projects.

Value Proposition

Developers choose this guide because it offers a clear, practical set of rules derived from Spotify's real-world iOS development, promoting readability and maintainability while aligning with Apple's official guidelines.

Overview

Guidelines for iOS development in use at Spotify

Use Cases

Best For

  • Teams adopting a standardized Objective-C style guide for iOS projects
  • Ensuring consistent code formatting and naming across an iOS codebase
  • Learning industry best practices for Objective-C and Objective-C++ development
  • Improving code documentation with Xcode's documentation style
  • Implementing nullability annotations for safer iOS code
  • Writing clean and maintainable container (array/dictionary) initializations

Not Ideal For

  • iOS projects where Swift is the primary or exclusive language
  • Teams with an established, divergent coding style they prefer not to change
  • Open-source libraries aiming for maximum contributor compatibility without vendor-specific prefixes
  • Rapid prototyping projects where strict formatting rules could slow down iteration

Pros & Cons

Pros

Comprehensive Formatting Rules

Defines precise rules for line length (120 characters), indentation (4 spaces), and container formatting, ensuring clean and consistent code layout across teams.

Nullability Safety

Recommends using NS_ASSUME_NONNULL_BEGIN/END and explicit nullable annotations, which helps prevent null pointer errors and improves code safety in Objective-C.

Consistent Documentation

Enforces Xcode's documentation style with /// comments and tags like @param and @return, making APIs easier to understand and maintain through IDE integration.

Early Return Pattern

Encourages returning early on errors to reduce nesting, as shown in examples, which enhances code clarity and reduces complexity.

Cons

Dated and Objective-C Focused

Published in 2015-2016 and not updated, making it less relevant for modern iOS development where Swift is predominant, and it lacks guidance on newer frameworks or Swift-specific practices.

Lack of Automation Support

Does not include or reference tools for automatically enforcing the style rules (e.g., clang-format integration), requiring manual adherence that can be error-prone and time-consuming.

Spotify-Specific Conventions

Includes rules like prefixing category methods with `spt_`, which are tailored for Spotify's internal codebase and may add unnecessary overhead or confusion for external teams.

Frequently Asked Questions

Quick Stats

Stars244
Forks35
Contributors0
Open Issues0
Last commit6 years ago
CreatedSince 2015

Tags

#code-standards#objective-c#coding-style#code-style#spotify#mobile-development#code-formatting#ios-development#style-guide

Built With

X
Xcode
O
Objective-C

Included in

iOS51.7k
Auto-fetched 11 hours ago

Related Projects

Swift Style Guide by @raywenderlichSwift Style Guide by @raywenderlich

The official Swift style guide for Kodeco.

Stars13,164
Forks2,102
Last commit1 year ago
Futurice iOS Good PracticesFuturice iOS Good Practices

Good ideas for iOS development, by Futurice developers.

Stars10,976
Forks1,225
Last commit2 years ago
NY Times - Objective C Style GuideNY Times - Objective C Style Guide

The Objective-C Style Guide used by The New York Times

Stars5,821
Forks1,236
Last commit3 years ago
GitHub - Style guide & coding conventions for Swift projectsGitHub - Style guide & coding conventions for Swift projects

**Archived** Style guide & coding conventions for Swift projects

Stars4,758
Forks560
Last commit8 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub