# Objective C

> Objective-C for legacy iOS/macOS development with manual memory. Use for .m files. Use when this capability is needed.

- Skill: `tomevault-io/objective-c` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/objective-c`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/objective-c/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/objective-c

---


# Objective-C

Objective-C is in **maintenance mode**. New features are rare, but it powers the Apple ecosystem's foundation. It allows mixing C++ (`.mm`) loosely.

## When to Use

- **Legacy iOS/macOS**: Maintaining apps created before 2014.
- **C++ Interop**: Obj-C++ is often the bridge between C++ engines and Swift.
- **Runtime Swizzling**: Dynamic method replacement (used by Analytics SDKs).

## Core Concepts

### Message Passing

`[object method:argument]`. Dynamic binding at runtime.

### ARC

Automatic Reference Counting. (Retain/Release).

### Headers

`.h` (interface) and `.m` (implementation).

## Best Practices (2025)

**Do**:

- **Use Nullability Annotations**: `nullable`, `nonnull` to aid Swift interop.
- **Use Modern Syntax**: `@[@"a", @"b"]` for arrays.
- **Migrate to Swift**: New features should be written in Swift.

**Don't**:

- **Don't use manual retain/release**: Always ensure ARC is on.

## References

- [Apple Developer Documentation](https://developer.apple.com/)

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/g1joshi) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

