---
title: "Contentstack"
description: "Contentstack"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/ios/reference/contentstack"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-20"
---

# Contentstack

## Contentstack

Contentstack class that exposes Stack instance

## stackWithAPIKey:accessToken:environmentName:

Create a new Stack instance with stack’s API key, Delivery token, and Environment.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN"
environmentName:@"ENVIRONMENT"];
Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:"ENVIRONMENT")
```

Stack API Key.

Environment specific delivery token.

Stack environment id to fetch content

## stackWithAPIKey:accessToken:environmentName:config:

Create a new Stack instance with stack’s API key, Delivery token, Environment and Config.

```
Obj-C
Config *config = [[Config alloc] init];
config.host = @"customcontentstack.io";
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN"
environmentName:@"ENVIRONMENT" config:config];
Swift
let config:Config = Config()
config.host = "customcontentstack.io"
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:"ENVIRONMENT", config:config)
```

Stack API Key.

Environment specific delivery token.

Stack environment id to fetch content

Config of stack.

## cancelAllRequestsOfStack:

Cancel all network request for Stack instance.

```
Obj-C
[Contentstack cancelAllRequestsOfStack:stack];
Swift
Contentstack.cancelAllRequestsOfStack(stack)
```

Instance of Stack.

## Contentstack | iOS Delivery SDK | Contentstack

Contentstack exposes the Stack instance in the iOS Delivery SDK, serving as the entry point for accessing your content.