Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover deploy - August 8, 2024 #7849

Merged
merged 82 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
fd6599e
Revert "Reverting SDK-5061 doc updates"
hokstuff Jul 24, 2024
58cad66
slight tweaks for new 10.0.0 world
hokstuff Jul 24, 2024
e2b95cf
Example success request and notice explanation
lydia-xie Jul 26, 2024
2d5bca6
BD-3333 Remove News Feed tile
rachel-feinberg Aug 6, 2024
247ee2b
fix objc typo; also make it match swift
hokstuff Aug 6, 2024
8148e0a
BD-3288
lydia-xie Aug 6, 2024
2a60f23
wording
lydia-xie Aug 6, 2024
75a49fb
BD-3311 update images
lydia-xie Aug 6, 2024
026bd46
BD-3334 Update navigation page with new screenshots and info
rachel-feinberg Aug 6, 2024
9e99c2b
Merge pull request #7827 from braze-inc/bd-3334
bre-fitzgerald Aug 6, 2024
28a9968
Update Punchh Dynamic Code Generation liquid
alex-braze Aug 6, 2024
4c40779
Apply suggestions from code review
alex-braze Aug 6, 2024
b1448b7
BD-3338 Apply template standards to Query Builder
rachel-feinberg Aug 6, 2024
18eb1c8
Update code_generation.md
alex-braze Aug 6, 2024
ac222be
QB Templates
rachel-feinberg Aug 6, 2024
709136e
Small tweak
rachel-feinberg Aug 6, 2024
ebc5aec
Update _docs/_user_guide/engagement_tools/campaigns/faq.md
lydia-xie Aug 6, 2024
407d14b
Merge pull request #7823 from braze-inc/BD-3288
lydia-xie Aug 6, 2024
9a74a60
Update _docs/_user_guide/data_and_analytics/query_builder.md
rachel-feinberg Aug 7, 2024
ceb62b6
updates
lydia-xie Aug 7, 2024
0e59886
Merge pull request #7829 from braze-inc/bd-3338
rachel-feinberg Aug 7, 2024
3e32157
Apply suggestions from code review
lydia-xie Aug 7, 2024
c5b3ef4
Merge pull request #7825 from braze-inc/BD-3311
lydia-xie Aug 7, 2024
215f0e8
Update scim_api_appendix.md
lydia-xie Aug 7, 2024
b8c9cfa
Adding in requested changes for variable in example code snippets
alex-braze Aug 7, 2024
2077acf
Fixing a variable
internetisaiah Aug 7, 2024
72a177d
Update _docs/_api/endpoints/messaging/send_messages/post_send_trigger…
lydia-xie Aug 7, 2024
5029c4f
Merge pull request #7767 from braze-inc/lx-success-notice
lydia-xie Aug 7, 2024
e8c8977
[BD-2809] Adding control variant alert to CC docs
internetisaiah Aug 7, 2024
48ab79e
BD-3273
lydia-xie Aug 7, 2024
978a9ab
image
lydia-xie Aug 7, 2024
5c7f2a8
Merge pull request #7834 from braze-inc/BD-3273
rachel-feinberg Aug 7, 2024
99c9b6d
[BD-3202] Clarifying headless UI for Apple TV
internetisaiah Aug 7, 2024
c780c4d
Updating tvOS integration docs
internetisaiah Aug 7, 2024
dfad024
[BD-3093] Adding 'api_trigger_properties' to Liquid table
internetisaiah Aug 7, 2024
f63f602
Apply suggestions from code review
internetisaiah Aug 7, 2024
7ce3045
Fixing broken link
internetisaiah Aug 7, 2024
dd9b0a3
Merge pull request #7836 from braze-inc/BD-3202
internetisaiah Aug 7, 2024
b98afd0
Rephrasing all examples
internetisaiah Aug 7, 2024
2539322
BD-3274
lydia-xie Aug 7, 2024
989ecba
remove extra prhasing
lydia-xie Aug 7, 2024
f7852ad
Update logging_analytics.md
internetisaiah Aug 7, 2024
e501883
Update integration.md
internetisaiah Aug 7, 2024
17a1aa9
phrase
lydia-xie Aug 7, 2024
697184a
Merge pull request #7838 from braze-inc/BD-3274
lydia-xie Aug 7, 2024
da983fe
BD-3144: Clarify SQL example and minor edits
lydia-xie Aug 7, 2024
8bed365
Merge pull request #7839 from braze-inc/BD-3144
rachel-feinberg Aug 7, 2024
e03fc8a
Merge pull request #7832 from braze-inc/lydia-xie-patch-3
rachel-feinberg Aug 7, 2024
585ab4a
BD-3342 Update estimated real open rate
rachel-feinberg Aug 7, 2024
55dccd9
edits to main catalogs doc and new article
lydia-xie Aug 7, 2024
f204059
tile
lydia-xie Aug 7, 2024
bc29a28
fix h3 to h2
lydia-xie Aug 7, 2024
0f2c63e
add link in main article
lydia-xie Aug 7, 2024
59afa54
BD-3257: Clarify conversion tracking rules for multiple devices
lydia-xie Aug 7, 2024
69ea784
Apply suggestions from code review
lydia-xie Aug 7, 2024
7020b3d
Update _docs/_user_guide/personalization_and_dynamic_content/catalogs…
lydia-xie Aug 7, 2024
4d4c39e
Update _docs/_user_guide/engagement_tools/campaigns/building_campaign…
rachel-feinberg Aug 7, 2024
134b39b
Merge pull request #7842 from braze-inc/lx-catalog
lydia-xie Aug 7, 2024
74f39e1
Merge pull request #7828 from braze-inc/alex-braze-patch-2
internetisaiah Aug 7, 2024
169568a
Update _docs/_developer_guide/customization_guides/content_cards/logg…
internetisaiah Aug 7, 2024
b9fc0a6
Merge pull request #7835 from braze-inc/BD-2809
internetisaiah Aug 8, 2024
53209e8
BD-3346
lydia-xie Aug 8, 2024
18878fb
Update supported_personalization_tags.md
internetisaiah Aug 8, 2024
30ce699
Update supported_personalization_tags.md
internetisaiah Aug 8, 2024
76b838f
Merge pull request #7837 from braze-inc/BD-3093
internetisaiah Aug 8, 2024
209e62f
add caveats to swift and objc
hokstuff Aug 8, 2024
c3b1f16
Tech writer review
internetisaiah Aug 8, 2024
962e84c
fix redirect
lydia-xie Aug 8, 2024
bcb0032
Merge pull request #7844 from braze-inc/BD-3346
lydia-xie Aug 8, 2024
26930ac
Merge pull request #7843 from braze-inc/BD-3257
lydia-xie Aug 8, 2024
2413659
BD-3330: Add FAQ for field-level encryption
lydia-xie Aug 8, 2024
21c128a
Apply suggestions from code review
lydia-xie Aug 8, 2024
159bd46
Update _docs/_hidden/private_betas/field_level_encryption.md
lydia-xie Aug 8, 2024
28c9b9a
Merge pull request #7845 from braze-inc/BD-3330
lydia-xie Aug 8, 2024
8c4bf44
BD-3010: Clarify Redshift URL
lydia-xie Aug 8, 2024
25f709d
Apply suggestions from code review
lydia-xie Aug 8, 2024
7cbad9a
Hide News Feed
rachel-feinberg Aug 8, 2024
c815109
Merge pull request #7820 from braze-inc/bd-3333
lydia-xie Aug 8, 2024
1f3a8c8
Merge pull request #7847 from braze-inc/lydia-xie-patch-3
rachel-feinberg Aug 8, 2024
06712b8
Update _includes/campaign_analytics.md
rachel-feinberg Aug 8, 2024
b62d042
Merge pull request #7841 from braze-inc/bd-3342
rachel-feinberg Aug 8, 2024
6097c8b
Merge pull request #7753 from braze-inc/sdk-4699-push-received-breaki…
internetisaiah Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ curl --location --request POST 'https://rest.iad-01.braze.com/canvas/trigger/sen

Message sending endpoint responses will include the message's `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch (unique ID for each "transmission" sent from the Braze platform). Check out [Dispatch ID behavior]({{site.baseurl}}/help/help_articles/data/dispatch_id/) for more information.

### Example success response

The status code 201 could return the following response body. If the Canvas is archived, stopped, or paused, the Canvas will not be sent through this endpoint.

```
{
"notice": "The Canvas is paused. Resume the Canvas to ensure trigger requests will take effect.",
"dispatch_id": "example_dispatch_id",
"message": "success"
}
```

If your Canvas is archived, you'll see this `notice` message: "The Canvas is archived. Unarchive the Canvas to ensure trigger requests will take effect." If your Canvas is not active, you'll see this `notice` message: "The Canvas is paused. Resume the Canvas to ensure trigger requests will take effect."

## Create send endpoint

**Using the Attributes Object in Canvas**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ Content Cards will only refresh on session start if a subscribe request is calle
{% endtab %}
{% endtabs %}




## Logging events

Logging valuable metrics like impressions, clicks, and dismissals is quick and simple. Set a custom click listener to manually handle these analytics.
Expand Down Expand Up @@ -244,10 +241,14 @@ BrazeContentCardsManager.getInstance().contentCardsActionListener = object : ICo

{% endsubtab %}
{% endsubtabs %}

{% alert important %}
To handle control variant Content Cards in your custom UI, pass in your [`com.braze.models.cards.Card`](https://braze-inc.github.io/braze-android-sdk/kdoc/braze-android-sdk/com.braze.models.cards/-card/index.html) object, then call the `logImpression` method as you would with any other Content Card type. The object will implicitly log a control impression to inform our analytics of when a user would have seen the control card.{% endalert %}

{% endtab %}
{% tab iOS %}

Implement the [`BrazeContentCardUIViewControllerDelegate`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/brazecontentcarduiviewcontrollerdelegate) protocol and set your delegate object as the `delegate` property of your `BrazeContentCardUI.ViewController`. This delegate will handle passing the data of your custom object back to Braze to be logged.
Implement the [`BrazeContentCardUIViewControllerDelegate`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/brazecontentcarduiviewcontrollerdelegate) protocol and set your delegate object as the `delegate` property of your `BrazeContentCardUI.ViewController`. This delegate will handle passing the data of your custom object back to Braze to be logged. For an example, see [Content Cards UI tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/c2-contentcardsui/).

{% subtabs local %}
{% subtab Swift %}
Expand Down Expand Up @@ -282,13 +283,14 @@ contentCardsController.delegate = delegate;
return YES;
}
```

{% endsubtab %}
{% endsubtabs %}

Refer to the [Content Cards UI tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/c2-contentcardsui/) for an example.

{% alert important %}
To handle control variant Content Cards in your custom UI, pass in your [`Braze.ContentCard.Control`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcard/control(_:)) object, then call the `logImpression` method as you would with any other Content Card type. The object will implicitly log a control impression to inform our analytics of when a user would have seen the control card.
{% endalert %}
{% endtab %}

{% tab Web %}

Log impression events when cards are viewed by users using [`logContentCardImpressions`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardimpressions):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ channel:

# Content Card integration

> This reference article covers the Content Card integration and the different data models and card-specific properties available for your Swift application.
> This reference article covers the Content Card integration and the different data models and card-specific properties available for your Swift application. When you're ready to get started with implementation and customization, see the [Content Card Customization Guide]({{site.baseurl}}/developer_guide/customization_guides/content_cards).

{% alert note %}
When you're ready to get started with implementation and customization, see the [Content Card Customization Guide]({{site.baseurl}}/developer_guide/customization_guides/content_cards).
{% endalert %}
## About the integration

The default Content Cards UI can be integrated from the `BrazeUI` library of the Braze SDK. Create the Content Cards view controller using the `braze` instance. If you wish to intercept and react to the Content Card UI lifecycle, implement [`BrazeContentCardUIViewControllerDelegate`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/brazecontentcarduiviewcontrollerdelegate) as the delegate for your `BrazeContentCardUI.ViewController`.

{% alert note %}
For more information about iOS view controller options, refer to the [Apple developer documentation](https://developer.apple.com/documentation/uikit/view_controllers/showing_and_hiding_view_controllers).
{% endalert %}

The `BrazeUI` library of the Swift SDK provides two default view controller contexts: navigation or modal. This means you can integrate Content Cards in these contexts by adding a few lines of code to your app or site. Both views offer customization and styling options as described in the [customization guide]({{site.baseurl}}/developer_guide/customization_guides/content_cards/customizing_styles/?tab=ios). You can also create a custom Content Card view controller instead of using the standard Braze one for even more customization options—refer to the [Content Cards UI tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/c2-contentcardsui/) for an example.
The `BrazeUI` library of the Swift SDK provides two default view controller contexts: navigation or modal. This means you can integrate Content Cards in these contexts by adding a few lines of code to your app or site. Both views offer customization and styling options as described in the [customization guide]({{site.baseurl}}/developer_guide/customization_guides/content_cards/customizing_styles/?tab=ios). You can also create a custom Content Card view controller instead of using the standard Braze one for even more customization options—refer to the [Content Cards UI tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/c2-contentcardsui/) for an example.

{% alert important %}
To handle control variant Content Cards in your custom UI, pass in your [`Braze.ContentCard.Control`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcard/control(_:)) object, then call the `logImpression` method as you would with any other Content Card type. The object will implicitly log a control impression to inform our analytics of when a user would have seen the control card.
{% endalert %}

## Navigation context

Expand Down Expand Up @@ -121,4 +123,4 @@ For more details, refer to the [`Context` class documentation](https://braze-inc
The Swift SDK does not provide animated GIF support by default. Support can be added by wrapping a third party or your own view in an instance of `GIFViewProvider`.

For more details on GIF support, refer to this [tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/c3-gif-support).
{% endalert %}
{% endalert %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ page_order: 1

> Learn how to customize your Content Cards for Apple's tvOS platform.

{% alert important %}
Keep in mind, you'll need to implement your own custom UI since Content Cards are supported via headless UI using the Swift SDK—which does not include any default UI or views for tvOS.
{% endalert %}

## Setting up your tvOS app

### Step 1: Create a new iOS app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ page_order: 0

> Learn how to customize your in-app messages for Apple's tvOS platform.

{% alert important %}
Keep in mind, you'll need to implement your own custom UI since in-app messaging is supported via headless UI using the Swift SDK—which does not include any default UI or views for tvOS.
{% endalert %}

## Setting up your tvOS app

### Step 1: Create a new iOS app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The Swift SDK provides a configuration-only approach to automate the processing
To enable the automatic push integration, set the `automation` property of the `push` configuration to `true`:

{% tabs %}
{% tab swift %}
{% tab Swift %}
```swift
let configuration = Braze.Configuration(apiKey: "{YOUR-BRAZE-API-KEY}", endpoint: "{YOUR-BRAZE-API-ENDPOINT}")
configuration.push.automation = true
Expand Down Expand Up @@ -85,7 +85,7 @@ The SDK must be initialized on the main thread to enable push notification autom
For more granular control, each automation step can be enabled or disabled individually:

{% tabs %}
{% tab swift %}
{% tab Swift %}

```swift
// Enable all automations and disable the automatic notification authorization request at launch.
Expand Down Expand Up @@ -130,7 +130,7 @@ The following code sample includes integration for provisional push authenticati
{% endalert %}

{% tabs %}
{% tab swift %}
{% tab Swift %}

```swift
application.registerForRemoteNotifications()
Expand Down Expand Up @@ -178,7 +178,7 @@ You must assign your delegate object using `center.delegate = self` synchronousl
Once APNs registration is complete, pass the resulting `deviceToken` to Braze to enable for push notifications for the user.

{% tabs %}
{% tab swift %}
{% tab Swift %}

Add the following code to your app's `application(_:didRegisterForRemoteNotificationsWithDeviceToken:)` method:

Expand Down Expand Up @@ -206,10 +206,11 @@ The `application:didRegisterForRemoteNotificationsWithDeviceToken:` delegate met

Next, pass the received push notifications along to Braze. This step is necessary for logging push analytics and link handling. Ensure that you call all push integration code in your application's main thread.

{% tabs %}
{% tab swift %}
#### Default push handling

Add the following code to your app's `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` method:
{% tabs %}
{% tab Swift %}
To enable Braze's default push handling, add the following code to your app's `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` method:

```swift
if let braze = AppDelegate.braze, braze.notifications.handleBackgroundNotification(
Expand All @@ -221,7 +222,7 @@ if let braze = AppDelegate.braze, braze.notifications.handleBackgroundNotificati
completionHandler(.noData)
```

Next, add the following code to your app's `userNotificationCenter(_:didReceive:withCompletionHandler:)` method:
Next, add the following to your app's `userNotificationCenter(_:didReceive:withCompletionHandler:)` method:

```swift
if let braze = AppDelegate.braze, braze.notifications.handleUserNotification(
Expand All @@ -232,29 +233,10 @@ if let braze = AppDelegate.braze, braze.notifications.handleUserNotification(
}
completionHandler()
```

**Foreground push handling**

To display a push notification while the app is in the foreground, implement `userNotificationCenter(_:willPresent:withCompletionHandler:)`:

```swift
func userNotificationCenter(_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
if #available(iOS 14.0, *) {
completionHandler([.list, .banner])
} else {
completionHandler([.alert])
}
}
```

If the foreground notification is clicked, the push delegate `userNotificationCenter(_:didReceive:withCompletionHandler:)` will be called, and Braze will log a push click event.

{% endtab %}
{% tab OBJECTIVE-C %}

Add the following code to your application's `application:didReceiveRemoteNotification:fetchCompletionHandler:` method:
{% tab OBJECTIVE-C %}
To enable Braze's default push handling, add the following code to your application's `application:didReceiveRemoteNotification:fetchCompletionHandler:` method:

```objc
BOOL processedByBraze = AppDelegate.braze != nil && [AppDelegate.braze.notifications handleBackgroundNotificationWithUserInfo:userInfo
Expand All @@ -277,25 +259,56 @@ if (processedByBraze) {

completionHandler();
```
{% endtab %}
{% endtabs %}

**Foreground push handling**
#### Foreground push handling

To display a push notification while the app is in the foreground, implement `userNotificationCenter:willPresentNotification:withCompletionHandler:`:
{% tabs %}
{% tab Swift %}
To enable foreground push notifications and let Braze recognize them when they're received, implement `UNUserNotificationCenter.userNotificationCenter(_:willPresent:withCompletionHandler:)`. If a user taps your foreground notification, the `userNotificationCenter(_:didReceive:withCompletionHandler:)` push delegate will be called and Braze will log the push click event.

```swift
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions
) -> Void) {
if let braze = AppDelegate.braze {
// Forward notification payload to Braze for processing.
braze.notifications.handleForegroundNotification(notification: notification)
}

// Configure application's foreground notification display options.
if #available(iOS 14.0, *) {
completionHandler([.list, .banner])
} else {
completionHandler([.alert])
}
}
```
{% endtab %}

{% tab OBJECTIVE-C %}
To enable foreground push notifications and let Braze recognize them when they're received, implement `userNotificationCenter:willPresentNotification:withCompletionHandler:`. If a user taps your foreground notification, the `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` push delegate will be called and Braze will log the push click event.

```objc
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
if (AppDelegate.braze != nil) {
// Forward notification payload to Braze for processing.
[AppDelegate.braze.notifications handleForegroundNotificationWithNotification:notification];
}

// Configure application's foreground notification display options.
if (@available(iOS 14.0, *)) {
completionHandler(UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner);
} else {
completionHandler(UNNotificationPresentationOptionAlert);
}
}
```

If the foreground notification is clicked, the push delegate `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` will be called, and Braze will log a push click event.

{% endtab %}
{% endtabs %}

Expand All @@ -305,32 +318,45 @@ Deep linking from a push into the app is automatically handled via our standard

## Subscribing to push notifications updates

To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(_:)/) method.

{% tabs %}
{% tab swift %}
{% tab Swift %}
To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(payloadTypes:_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(payloadtypes:_:)/) method.

You can use the `payloadTypes` parameter to specify whether you'd like to subscribe to notifications involving push open events, push received events, or both.

{% alert important %}
Keep in mind, push received events will only trigger for foreground notifications and `content-available` background notifications. It will not trigger for notifications received while terminated or for background notifications without the `content-available` field.
{% endalert %}

```swift
// This subscription is maintained through a Braze cancellable, which will observe for changes until the subscription is cancelled.
// You must keep a strong reference to the cancellable to keep the subscription active.
// The subscription is canceled either when the cancellable is deinitialized or when you call its `.cancel()` method.
let cancellable = AppDelegate.braze?.notifications.subscribeToUpdates { payload in
let cancellable = AppDelegate.braze?.notifications.subscribeToUpdates(payloadTypes: [.open, .received]) { payload in
print("Braze processed notification with title '\(payload.title)' and body '\(payload.body)'")
}
```

{% endtab %}

{% tab OBJECTIVE-C %}
To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(payloadTypes:_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(payloadtypes:_:)/) method.

You can use the `payloadTypes` parameter to specify whether you'd like to subscribe to notifications involving push open events, push received events, or both.

{% alert important %}
Keep in mind, push received events will only trigger for foreground notifications and `content-available` background notifications. It will not trigger for notifications received while terminated or for background notifications without the `content-available` field.
{% endalert %}

```objc
BRZCancellable *cancellable = [notifications subscribeToUpdatesWithInternalNotifications:NO update:^(BRZNotificationsPayload * _Nonnull payload) {
NSInteger filtersValue = BRZNotificationsPayloadTypeFilter.opened.rawValue | BRZNotificationsPayloadTypeFilter.received.rawValue;
BRZNotificationsPayloadTypeFilter *filters = [[BRZNotificationsPayloadTypeFilter alloc] initWithRawValue: filtersValue];
BRZCancellable *cancellable = [notifications subscribeToUpdatesWithPayloadTypes:filters update:^(BRZNotificationsPayload * _Nonnull payload) {
NSLog(@"Braze processed notification with title '%@' and body '%@'", payload.title, payload.body);
}];
```

{% endtab %}
{% endtabs %}

{% endtabs %}
{% alert note %}
When using the automatic push integration, `subscribeToUpdates(_:)` is the only way to be notified of remote notifications processed by Braze. The `UIAppDelegate` and `UNUserNotificationCenterDelegate` system methods are not called when the notification is automatically processed by Braze.
{% endalert %}
Expand All @@ -348,6 +374,8 @@ If you'd like to test in-app and push notifications via the command line, you ca
If you are using the [older navigation]({{site.baseurl}}/navigation), these pages are in a different location: <br>- **API Keys** is located at **Developer Console** > **API Settings** <br>- **Search Users** is located at **Users** > **User Search**
{% endalert %}

In the following example, the `US-01` instance is being used. If you're not on this instance, refer to our [API documentation][66] to see which endpoint to make requests to.

```bash
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_API_KEY}" -d '{
"external_user_ids":["YOUR_EXTERNAL_USER_ID"],
Expand All @@ -361,7 +389,6 @@ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR
}
}' https://rest.iad-01.braze.com/messages/send
```
The preceding example is for customers on the `US-01` instance. If you are not on this instance, refer to our [API documentation][66] to see which endpoint to make requests to.

## Push primers {#push-primers}

Expand Down
Loading