---
updatedAt: 2026-08-10T16:42:09.000Z
---

# Enable wishlist-item-added signals in an iOS app

The wishlist-item-added signal fires when a user adds a product, service or offering to a wishlist, favorites list or saved-items list. Use this signal to identify purchase intent, trigger price-drop or back-in-stock journeys and segment contacts by product interest.

**Availability:** Pro, Premium and Ultimate

**Languages:** Swift and Objective-C

***

# Implementation considerations

## When to fire the signal

Decide when to send the signal relative to the wishlist action:

* **On tap** - fire as soon as the user taps the heart, star or save icon. Captures intent even if the add fails.
* **After confirmation** - fire only after the item is confirmed added. More accurate, but may miss failed attempts.

For most implementations, firing on tap is recommended.

## Multiple entry points

Your app may support adding to favorites from more than one screen:

* Product detail view controller - heart button in the navigation bar
* Product listing or home screen - quick-save icon on a product card

Each entry point may have access to different amounts of product data. Make sure all flows are covered.

## Contact mapping

Include the `audience` field to attribute this signal to a contact in Connect. See [How behavior signals update Connect data](https://developer.goacoustic.com/acoustic-connect/docs/how-behavior-signals-are-processed-in-connect) for identifier formats and contact resolution details.

***

# Configuration

Before adding behavior signals, integrate the Connect SDK into your app. A recent **beta (debug) version&#x20;**&#x6F;f the SDK is required (2.1.17 or later). See the guide for your development language: [Swift](https://developer.goacoustic.com/acoustic-connect/docs/integrate-connect-library-into-native-ios-app-swift) or [Objective-C](https://developer.goacoustic.com/acoustic-connect/docs/integrate-connect-sdk-into-ios-app-objective-c).

## Method

<Tabs>
  <Tab title="Swift">
    ```swift Swift
    func logSignal(_ data: [String: Any]?) -> Bool
    ```

    Sends the signal to the Acoustic Connect endpoint. Initialize the Connect SDK before calling this method using `ConnectSDK.shared.enable(with:)`.

    Pass all fields as a flat `[String: Any]` dictionary. The SDK handles the signal structure automatically.
  </Tab>

  <Tab title="Objective-C">
    ```objectivec
    - (BOOL)logSignal:(NSDictionary *)values;
    ```

    Sends the signal to the Acoustic Connect endpoint. Initialize the Connect SDK before calling this method using `[[ConnectApplicationHelper sharedInstance] enableFramework:withPostMessageUrl:]`.

    Pass all fields as an `NSDictionary`. The SDK handles the signal structure automatically.
  </Tab>
</Tabs>

## Signal fields

### Required

| Field        | Type   | Description                                                     |
| ------------ | ------ | --------------------------------------------------------------- |
| `productId`  | String | Unique product identifier. If missing, the signal is discarded. |
| `signalType` | String | Signal type. Value: `"wishlistItemAdded"`.                      |

### Optional

| Field               | Type            | Description                                                                                                                                           |
| ------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audience`          | `[String: Any]` | Key-value pairs for contact mapping. Keys must match contact attribute names exactly as they appear in Connect, including capitalization and spacing. |
| `category`          | String          | Signal category. Value: `"Behavior"`.                                                                                                                 |
| `currency`          | String          | ISO 4217 currency code (for example, `"USD"`, `"EUR"`). Defaults to the currency set for your Connect subscription.                                   |
| `description`       | String          | A description of the signal                                                                                                                           |
| `effect`            | String          | Describes the effect of the signal on engagement. Use `"positive"` for wishlist additions.                                                            |
| `externalVariantId` | String          | Identifier for the specific product variant saved, such as a size or color                                                                            |
| `name`              | String          | A label to differentiate this signal from others (for example, `"wishlistItemAdded from product detail"`). Max 256 characters                         |
| `price`             | Number          | Price of the product at the time it was saved                                                                                                         |
| `productCategory`   | String          | Category or department the product belongs to                                                                                                         |
| `productName`       | String          | Display name of the product                                                                                                                           |
| `wishlistId`        | String          | Identifier for the specific wishlist the item was added to, useful if a contact can maintain more than one list                                       |

<Callout icon="✅" theme="okay">
  ### Things to know

  - `price` accepts a native Swift numeric type (`Double`, `NSDecimalNumber`).

  - Optional fields enhance the signal but do not prevent processing if omitted.
</Callout>

## Basic example

<Tabs>
  <Tab title="Swift">
    ```swift Swift
    import Connect

    ConnectCustomEvent.sharedInstance().logSignal([
        "signalType": "wishlistItemAdded",
        "productId": "SKU-12345",
        "productName": "Linen Throw",
        "price": 89.99,
        "currency": "USD",
        "effect": "positive"
    ])
    ```
  </Tab>

  <Tab title="Objective-C">
    ```objectivec
    #import <Connect/Connect.h>

    [[ConnectCustomEvent sharedInstance] logSignal:@{
        @"signalType": @"wishlistItemAdded",
        @"productId": @"SKU-12345",
        @"productName": @"Linen Throw",
        @"price": @89.99,
        @"currency": @"USD",
        @"effect": @"positive"
    }];
    ```
  </Tab>
</Tabs>

## Complete example

This example fires a wishlist item added signal from a product detail view controller when the user taps the heart button. The signal fires only when the item is being added (not removed), determined by the return value of `FavoritesStore.shared.toggle(_:)`.

<Tabs>
  <Tab title="Swift">
    ```swift Swift
    import Connect

    @objc private func toggleFavorite() {
        let isFav = FavoritesStore.shared.toggle(product.id)
        favoriteItem.image = UIImage(systemName: isFav ? "heart.fill" : "heart")
        favoriteItem.tintColor = isFav ? Theme.accent : Theme.primary

        if isFav {
            // Item was just added to favorites
            var signal: [String: Any] = [
                "signalType": "wishlistItemAdded",
                "productId": product.id,
                "productName": product.name,
                "price": product.price.doubleValue,
                "productCategory": product.categoryName,
                "currency": "USD",
                "category": "Behavior",
                "effect": "positive",
                "name": "wishlistItemAdded from product detail"
            ]

            if UserSession.shared.isAuthenticated, let email = UserSession.shared.email {
                signal["audience"] = ["Email Address": email]
            }

            let accepted = ConnectCustomEvent.sharedInstance().logSignal(signal)
            NSLog("[Connect] wishlistItemAdded signal accepted: \(accepted)")
        }
    }
    ```
  </Tab>

  <Tab title="Objective-C">
    ```objectivec
    #import <Connect/Connect.h>

    - (void)toggleFavorite {
        BOOL isFav = [FavoritesStore.shared toggle:self.product.id];
        self.favoriteItem.image = [UIImage systemImageNamed:isFav ? @"heart.fill" : @"heart"];
        self.favoriteItem.tintColor = isFav ? Theme.accent : Theme.primary;

        if (isFav) {
            // Item was just added to favorites
            NSMutableDictionary *signal = [@{
                @"signalType": @"wishlistItemAdded",
                @"productId": self.product.id,
                @"productName": self.product.name,
                @"price": @(self.product.price.doubleValue),
                @"productCategory": self.product.categoryName,
                @"currency": @"USD",
                @"category": @"Behavior",
                @"effect": @"positive",
                @"name": @"wishlistItemAdded from product detail"
            } mutableCopy];

            if ([[UserSession shared] isAuthenticated] && [[UserSession shared] email]) {
                signal[@"audience"] = @{ @"Email Address": [[UserSession shared] email] };
            }

            BOOL accepted = [[ConnectCustomEvent sharedInstance] logSignal:signal];
            NSLog(@"[Connect] wishlistItemAdded signal accepted: %@", accepted ? @"true" : @"false");
        }
    }
    ```
  </Tab>
</Tabs>

***

# Best practices

1. Capture product data at the point of interaction - it is always available when the user is on the product detail screen.
2. Use consistent `currency` values across signals for accurate segmentation.
3. Always include an `audience` identifier where possible - wishlist activity is a strong intent signal worth attaching to a contact.
4. If your app doesn't display prices, omit `price` and `currency` rather than sending placeholder values.

***

# Verification

After adding a product to your wishlist or favorites, check the Xcode console for:

```
[Connect] wishlistItemAdded signal accepted: true
```

The `false` value means the SDK rejected the call - see Troubleshooting below. Once the console confirms acceptance, verify the signal is available in Connect.

***

# Troubleshooting

**Signal not appearing in Connect?**

* Confirm the Connect SDK is initialized before any signal calls. See [Method](#method).
* Capture the return value: `let accepted = ConnectCustomEvent.sharedInstance().logSignal(signal)`. A `false` return indicates the SDK rejected the call.
* Confirm `productId` is present - it is required and its absence discards the entire signal.
* Verify the `appKey` and `postURL` match the Connect org you're checking.

**Contact not created or updated?**

* Verify attribute key names in `audience` match exactly how they appear in Connect - including capitalization and spacing.

***

# Related pages

* [Behavior signals in a native iOS app](https://developer.goacoustic.com/acoustic-connect/docs/behavior-signals-in-a-native-ios-app)
* [How behavior signals are processed in Connect](https://developer.goacoustic.com/acoustic-connect/docs/how-behavior-signals-are-processed-in-connect)