RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/contentstack/contentstack-ios

Cursor rule

.cursor/rules/contentstack-ios-cda.mdc

Contentstack CDA patterns – Stack/Config, HTTP, retry, callbacks, Content Delivery API

Cursor rules

Quality

55/100

Scores the file, not the repository.

Length

302 words

6 headings · 0 code blocks

Repository

3

— · pushed 5 days ago

Last changed

3 days ago

First indexed 3 days ago.
contentstack/contentstack-ios/.cursor/rules/contentstack-ios-cda.mdcRawGitHub
1---
2description: Contentstack CDA patterns – Stack/Config, HTTP, retry, callbacks, Content Delivery API
3globs:
4 - "Contentstack/**/*.{h,m}"
5 - "ContentstackInternal/**/*.{h,m}"
6---
7 
8# Contentstack iOS CDA – SDK Rules
9 
10Apply when editing the SDK core (`Contentstack/`, `ContentstackInternal/`). Keep behavior aligned with the [Content Delivery API](https://www.contentstack.com/docs/apis/content-delivery-api/).
11 
12## Stack and Config
13 
14- **Entry point:** `+[Contentstack stackWithAPIKey:accessToken:environmentName:]` and `stackWithAPIKey:accessToken:environmentName:config:` return a **`Stack`**. Use **`Config`** for optional settings (host, region, branch, delegate, early access).
15- **Defaults:** Follow existing **`Config`** initialization (host/version behavior as implemented in `Config` / stack setup).
16- **Region / branch:** Support regional endpoints and branch delivery via **`Config`** properties, consistent with CDA docs and current stack URL building (`CSIOAPIURLs`, etc.).
17 
18## HTTP layer
19 
20- **Requests** should flow through **`CSIOCoreHTTPNetworking`** and **`CSURLSessionManager`** (and related internal types). Do not bypass the shared session stack for CDA calls without a strong reason.
21- **Headers:** Preserve User-Agent, access token, environment, and other required CDA headers as built in existing request code (`CSIOConstants`, stack configuration).
22- **Errors:** Map API failures to existing patterns (`NSError`, failure blocks, or error callbacks) so app code receives consistent semantics.
23 
24## Retry and resilience
25 
26- Retry logic for transient failures lives in the networking layer (e.g. **`CSIOCoreHTTPNetworking`** handling of status / error codes). When changing retry behavior, keep defaults and caps consistent with CDA-friendly backoff and document any behavior change.
27- Unlike some other SDKs, retry is not always exposed as a separate public **`Config`** surface; prefer adjusting the internal implementation coherently.
28 
29## Callbacks and async
30 
31- Use **blocks**, delegates (`CSURLSessionDelegate`), and existing completion patterns already used on **`Stack`**, **`Entry`**, **`Query`**, **`Asset`**, **`SyncStack`**, etc.
32- Do not change public callback signatures without a compatibility plan (semver / migration note).
33 
34## CDA concepts
35 
36- **Entry, Query, Asset, Content Type, Sync, Taxonomy, AssetLibrary, Group, QueryResult** – follow existing class names and CDA semantics (query parameters, response parsing). When adding CDA features, align with the official Content Delivery API documentation and with other Contentstack CDA SDKs where practical.
37 

Sections

  • Contentstack iOS CDA – SDK Rules
  • Stack and Config
  • HTTP layer
  • Retry and resilience
  • Callbacks and async
  • CDA concepts

What it covers

code-styledo-not

Stack — with the evidence

swift

(0.60)

github-actions

(0.60)

Glob targeting

  • Contentstack/**/*.{h,m}
  • ContentstackInternal/**/*.{h,m}

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
contentstack
Language
—
License
—
Archived
no

All configs in this repo

Also in contentstack/contentstack-ios

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
contentstack/contentstack-ios.cursor/rules/code-review.mdc · 3Cursor rulesswiftgithub-actionstestgitsecuritydependencies+148/1003 days ago
contentstack/contentstack-ios.cursor/rules/ios.mdc · 3Cursor rulesswiftgithub-actionsstylearchdocs52/1003 days ago
contentstack/contentstack-ios.cursor/rules/testing.mdc · 3Cursor rulesswiftgithub-actionsteststylearchtesting-strategy+163/1003 days ago
contentstack/contentstack-iosAGENTS.md · 3AGENTS.mdswiftgithub-actionsdo-notagent-behaviour63/1003 days ago
Diff against .cursor/rules/code-review.mdc Diff against .cursor/rules/ios.mdc Diff against .cursor/rules/testing.mdc Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4kCursor rulestypescriptnode+14teststylearchtypes+296/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126Cursor rulesgobiome+4buildlint-formatstylearch+396/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack