> For the complete documentation index, see [llms.txt](https://docs.mychips.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mychips.io/ios/sdk-native/sdk-native-data-reference.md).

# SDK Native - Data Reference

## Native SDK — Data Reference

Complete reference for all data objects available in the native campaigns SDK.

***

<figure><img src="/files/ugYWrFGsyJVza7CrPZC1" alt=""><figcaption></figcaption></figure>

### MCCampaign

The main campaign object passed to your renderer's `configure(cell:campaign:at:)`.

<table><thead><tr><th width="232">Field</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>String</code></td><td>Unique campaign identifier</td></tr><tr><td><code>name</code></td><td><code>String</code></td><td>Campaign display name</td></tr><tr><td><code>type</code></td><td><code>String</code></td><td>Campaign type. See <code>MCCampaignType</code> constants below.</td></tr><tr><td><code>creatives</code></td><td><code>MCCreatives?</code></td><td>Image URLs (see below)</td></tr><tr><td><code>links</code></td><td><code>MCLinks?</code></td><td>Tracking and navigation URLs (see below)</td></tr><tr><td><code>totalConvertedValue</code></td><td><code>Double</code></td><td>Total reward in your virtual currency (including promo)</td></tr><tr><td><code>remainingConvertedValue</code></td><td><code>Double</code></td><td>Remaining reward the user can earn</td></tr><tr><td><code>promoRatio</code></td><td><code>Double</code></td><td>Promotional multiplier (1.0 = no promo, 2.0 = double)</td></tr><tr><td><code>progress</code></td><td><code>MCProgress?</code></td><td>User's progress. <strong><code>nil</code></strong> if the user hasn't started.</td></tr></tbody></table>

***

### MCCreatives

Image assets for a campaign.

<table><thead><tr><th width="211">Field</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>thumbnail</code></td><td><code>String?</code></td><td>Small square preview image URL</td></tr><tr><td><code>cover</code></td><td><code>String?</code></td><td>Full-size banner image URL</td></tr></tbody></table>

***

### MCLinks

Tracking and navigation URLs. Managed automatically by the SDK when using `MCNativeAdView`.

<table><thead><tr><th width="202">Field</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>trackingUrl</code></td><td><code>String?</code></td><td>Click tracking URL</td></tr><tr><td><code>trackingPixelUrl</code></td><td><code>String?</code></td><td>Impression pixel URL (fired automatically by the SDK)</td></tr><tr><td><code>detailUrl</code></td><td><code>String?</code></td><td>Campaign detail page URL (opened on click)</td></tr></tbody></table>

***

### MCProgress

User's progress on a campaign. **`nil`** when the user hasn't started the campaign.

<table><thead><tr><th width="170">Field</th><th width="147">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code></td><td><code>String?</code></td><td>Progress status. See <code>MCCampaignStatus</code> constants below.</td></tr><tr><td><code>eventsCompleted</code></td><td><code>Int</code></td><td>Number of events the user has completed</td></tr><tr><td><code>totalEvents</code></td><td><code>Int</code></td><td>Total events required to complete the campaign</td></tr><tr><td><code>valueEarned</code></td><td><code>Double</code></td><td>Reward earned so far in your virtual currency</td></tr><tr><td><code>progressValue</code></td><td><code>Double</code></td><td>Completion percentage (0–100)</td></tr></tbody></table>

***

### MCMeta

Response metadata returned alongside the campaign list.

<table><thead><tr><th width="155">Field</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>version</code></td><td><code>String</code></td><td>API response format version</td></tr><tr><td><code>count</code></td><td><code>Int</code></td><td>Number of campaigns returned</td></tr></tbody></table>

***

### MCCampaignType (constants)

Known campaign type values. Compare against `campaign.type`:

<table><thead><tr><th width="336">Constant</th><th>Value</th></tr></thead><tbody><tr><td><code>MCCampaignType.multiReward</code></td><td><code>"MultiReward"</code></td></tr><tr><td><code>MCCampaignType.playToEarn</code></td><td><code>"Play2Earn"</code></td></tr><tr><td><code>MCCampaignType.singleReward</code></td><td><code>"SingleReward"</code></td></tr></tbody></table>

```swift
if campaign.type == MCCampaignType.multiReward {
    // Handle multi-reward campaign
}
```

> The `type` field is a `String`, not an enum, because new types may be added in the future. Unknown types will not break your app.

***

### MCCampaignStatus (constants)

Known progress status values. Compare against `campaign.progress?.status`:

<table><thead><tr><th width="310">Constant</th><th>Value</th></tr></thead><tbody><tr><td><code>MCCampaignStatus.clicked</code></td><td><code>"clicked"</code></td></tr><tr><td><code>MCCampaignStatus.started</code></td><td><code>"started"</code></td></tr><tr><td><code>MCCampaignStatus.installed</code></td><td><code>"installed"</code></td></tr><tr><td><code>MCCampaignStatus.completed</code></td><td><code>"completed"</code></td></tr><tr><td><code>MCCampaignStatus.expired</code></td><td><code>"expired"</code></td></tr><tr><td><code>MCCampaignStatus.closed</code></td><td><code>"closed"</code></td></tr></tbody></table>

```swift
if let status = campaign.progress?.status, status == MCCampaignStatus.completed {
    // Campaign completed!
}
```

> The `status` field is a `String`, not an enum, because new statuses may be added in the future.

***

### Image Loading

The SDK provides a built-in image loader. Use it anywhere in your renderer:

```swift
MCOfferwallSDK.shared.loadImage(url: url, into: imageView)
```

* Runs on a background thread
* Decodes the image and sets it on the main thread
* Handles cell view recycling correctly
* No external library needed (no SDWebImage, Kingfisher, or Nuke)

> You can also use your own image loading library if you prefer. The SDK does not restrict this.

***

### External References

For a more comprehensive list of examples and mappings, you can also check out the [Figma Showcase](https://www.figma.com/board/7ctPofi9irp7PV4TwT3a7l/MyChips-SDK-Default-Layouts?node-id=0-1\&t=Ej26WBktLfW0wu3A-1) of different templates.
