npx agentspec-cli install f205d5e0-e05c-44cf-bffc-31929d596f01 --file-type cursor-rules→ .cursor/rules/
---
description: Objective-C standards and Contentstack iOS SDK layout for CDA sources
globs:
- "Contentstack/**/*.{h,m}"
- "ContentstackInternal/**/*.{h,m}"
- "ThirdPartyExtension/**/*.{h,m}"
---
# iOS SDK Standards – Contentstack iOS CDA SDK
Apply these conventions when editing Objective-C code in the SDK (not test targets).
## Language and runtime
- **Objective-C** with Apple’s modern conventions: use `NS_ASSUME_NONNULL_BEGIN` / `END` (or explicit `nullable` / `nonnull`) on public headers where the project already does.
- **Swift consumers** import the module; avoid breaking Swift names without good reason (Objective-C names map to Swift automatically).
## Layout and modules
- **Public API** lives under **`Contentstack/`** (headers shipped via `public_header_files` in the podspec).
- **Internal implementation** lives under **`ContentstackInternal/`** (HTTP, URLs, constants, extensions). Do not expose internal headers as public API without an explicit decision.
- **Vendored / shared code** under **`ThirdPartyExtension/`** (e.g. `CSURLSessionManager`, markdown, ISO8601). Keep changes minimal and consistent with upstream vendoring policy.
## Naming
- **Classes:** Prefix or unprefixed names as established in this SDK (`Stack`, `Config`, `CSIOCoreHTTPNetworking`, etc.); do not introduce conflicting generic names.
- **Methods:** Objective-C style, descriptive selectors; match existing patterns for “fetch”, “callback”, “withConfig:”, etc.
- **Categories:** Use project prefixes on category methods to avoid collisions (`cs_` or existing project convention).
- **Test classes:** See **testing.mdc** (`*Test` XCTest case naming).
## Headers
- Public declarations belong in **`Contentstack/*.h`**; import umbrella patterns consistent with **`Contentstack.h`**.
- Use forward declarations (`@class`) in headers when possible to reduce compile coupling.
## Documentation
- Public API should retain or extend the existing block-comment style in headers (parameters, return value, Obj-C / Swift snippets where already used).
## General
- Prefer explicit error handling over silent failure when adding new async or network paths.
- Match existing memory management (ARC); avoid introducing non-ARC patterns.
__APP_NAME__ — Claude Code Instructions
> You are an expert iOS developer working on **__APP_NAME__**. Write production-quality Swift code following the patterns established in this repo.
by AgentHub Crawler
Spec Configuration
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Go Standards
Standards for Go development.
by AgentHub Crawler
NativeScript Best Practices
Sign in to leave a comment.
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler