---
title: "Test inline campaigns (iOS)"
id: "test-inline-campaigns-ios"
project: "Contextual Commerce"
url: "https://docs.bazaarvoice.com/articles/contextual-commerce/test-inline-campaigns-ios"
updated: 2026-10-15T09:12:59Z
---

# Test inline campaigns \(iOS\)

This section describes how to validate your integration by forcing inline campaigns to appear in specific locations, ensuring that the component's expansion and collapse behavior does not interfere with your existing UI layouts.

**Note:** Test `GranifyInlineView`and `GranifyInlineSwiftUIView` extensively because they are embedded in the UI.

## Test with overrides

You can test inline campaigns manually using the `Granify.overrideGranifyInlineView(label:)` function. This function accepts a JSON object that specifies the details of a GranifyInlineViewLabel. Refer to the following example JSON objects for a product page or cart page.

Product page:
 
```json
[JSON] { "name": "aboveProductPageProductPhoto", "product_id": <product id> }
```


Cart page inline associated with product:
 
```json
[JSON] { "name": "bottomOfListedProduct", "product_id": <cart product id>, "sku": <cart product sku>}
```


Inline not associated with a product:
 
```json
[JSON] { "name": "aboveCartPageTotal"}
```


You should also:

* Implement a text box within your app's internal debug menu that accepts these JSON strings and passes them to `Granify.overrideGranifyInlineView(label:)`.
* Use the override function with `Granify.showConcept(conceptId:)` to display a specific campaign creative within your desired `GranifyInlineView`.

Inline views are not hidden when a restricted state is set. They will persist and remain visible regardless of the current restricted state configuration.

###  **Troubleshooting**

If you are using Interface Builder to change a `UIView` to a custom class and `GranifyInlineView` results in `GranifyInlineView` not being found, do the following:

Use `GFYGranifyInlineView` instead of `GranifyInlineView` in the **Custom Class &gt; Class** field in Interface Builder to avoid this error.
[![Provide feedback button](/resources/Storage/contextual-commerce/bv-global/topic-footer-2026/provide-feedback-button.png)](https://docs.google.com/forms/d/1qGZ5rApqDrXO_j6vNzcDihDAOPMEjmUr1alHvcEIbQU/edit)