Loading






1# Contentstack iOS CDA SDK – Agent Guide23This document is the main entry point for AI agents working in this repository.45## Project67- **Name:** Contentstack iOS CDA SDK (contentstack-ios)8- **Purpose:** iOS client for the Contentstack **Content Delivery API (CDA)**. It fetches content (entries, assets, content types, sync, taxonomy) from Contentstack for iOS apps (Objective-C primary API; Swift-compatible headers).9- **Repo:** [contentstack-ios](https://github.com/contentstack/contentstack-ios)1011## Tech stack1213- **Languages:** Objective-C (public SDK surface), with Swift-callable APIs via generated/bridged headers14- **IDE / build:** Xcode, `Contentstack.xcodeproj`15- **Distribution:** CocoaPods (`Contentstack.podspec`); no Swift Package Manager manifest in-repo today16- **HTTP:** `NSURLSession` via `CSURLSessionManager` and `CSIOCoreHTTPNetworking` (internal)17- **Testing:** XCTest, target **ContentstackTest** (`ContentstackTest.xctest`), scheme **Contentstack** (tests enabled; code coverage for **Contentstack** framework)1819## Main entry points2021- **`Contentstack`** – Factory: `+[Contentstack stackWithAPIKey:accessToken:environmentName:]` and `stackWithAPIKey:accessToken:environmentName:config:` return a **`Stack`**.22- **`Stack`** – Main API surface: content types, entries, queries, assets, asset library, sync, taxonomy, etc.23- **`Config`** – Optional settings: host, region, version (read-only where applicable), branch, URL session delegate, early access headers.24- **Paths (source):** `Contentstack/` (public headers + implementation), `ContentstackInternal/` (HTTP, URLs, constants, internal helpers), `ThirdPartyExtension/` (networking session layer, markdown, ISO8601).25- **Paths (tests):** `ContentstackTest/`2627## Commands2829- **Build framework:**30 `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'generic/platform=iOS' -configuration Debug build`31- **Run tests:**32 `xcodebuild -project Contentstack.xcodeproj -scheme Contentstack -destination 'platform=iOS Simulator,name=<Device>' test`33 Pick a simulator you have installed (e.g. **iPhone 16**). Tests may require **`ContentstackTest/config.json`** (or equivalent) with stack credentials for integration-style cases—do not commit secrets.34- **CocoaPods lint (maintainers):**35 `pod lib lint Contentstack.podspec`3637Use **Product → Test** in Xcode as an alternative to `xcodebuild test`.3839## Rules and skills4041- **`.cursor/rules/`** – Cursor rules for this repo:42 - **README.md** – Index of all rules and when each applies.43 - **dev-workflow.md** – Branches, tests, PR expectations.44 - **ios.mdc** – Applies to SDK Objective-C sources: style, structure, naming.45 - **contentstack-ios-cda.mdc** – Applies to SDK core: CDA patterns, Stack/Config, HTTP/retry, callbacks, CDA alignment.46 - **testing.mdc** – Applies to **ContentstackTest**: XCTest naming, unit vs integration-style tests.47 - **code-review.mdc** – Always applied: PR/review checklist (aligned with other Contentstack CDA SDKs).48- **`skills/`** – Reusable skill docs:49 - **contentstack-ios-cda** – CDA implementation and SDK core behavior.50 - **testing** – Adding or refactoring tests.51 - **code-review** – PR review or pre-submit checklist.52 - **framework** – Config, HTTP session layer, retry behavior, and networking internals.5354Refer to `.cursor/rules/README.md` for the rule index and to `skills/README.md` for when to use each skill.5556For cross-SDK alignment, see the Java CDA SDK’s **AGENTS.md** and `.cursor/rules/` in [contentstack-java](https://github.com/contentstack/contentstack-java) (patterns are analogous; APIs and build tools differ).57
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| contentstack/contentstack-ios.cursor/rules/ios.mdc · 3 | Cursor rules | stylearchdocs | 52/100 | 11 days ago | |
| contentstack/contentstack-ios.cursor/rules/testing.mdc · 3 | Cursor rules | teststylearchtesting-strategy+1 | 63/100 | 11 days ago | |
| contentstack/contentstack-ios.cursor/rules/code-review.mdc · 3 | Cursor rules | testgitsecuritydependencies+1 | 48/100 | 11 days ago | |
| contentstack/contentstack-ios.cursor/rules/contentstack-ios-cda.mdc · 3 | Cursor rules | styledo-not | 55/100 | 11 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 200k | AGENTS.md | buildteststylearch+3 | 100/100 | 11 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 5 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 11 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 11 days ago | |
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 11 days ago | |
| elastic/elasticsearchx-pack/plugin/inference/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+3 | 100/100 | 11 days ago | |
| rails/railsAGENTS.md · 59k | AGENTS.md | teststylearchgit+4 | 100/100 | 11 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 10 days ago |