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

Clarifying updates to Cordova push documentation #7451

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
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 @@ -13,21 +13,27 @@ channel: push

# Push notification integration

> Learn how to integrate basic iOS push notifications for the Cordova Braze SDK. Rich push notifications and push stories are already available for Android by default. To integrate full push notification capabilities for either platform, see the [iOS]({{site.baseurl}}/developer_guide/platform_integration_guides/swift/push_notifications/integration/) or [Android]({{site.baseurl}}/developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration/) push notification integration guides.
> Learn how to integrate push notifications for the Cordova Braze SDK.

{% multi_lang_include cordova/prerequisites.md %}

## Basic push features

By default, basic push notification features are enabled in the Braze Cordova plugin. You can disable these features by [customizing your XML configurations]({{site.baseurl}}/developer_guide/platform_integration_guides/cordova/initial_setup/customizations/#customization-options). For more in-depth native push notification features, see the [iOS]({{site.baseurl}}/developer_guide/platform_integration_guides/swift/push_notifications/integration/) and [Android]({{site.baseurl}}/developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration/) push notification guides.

## Extended push features

{% alert important %}
Anytime you add, remove, or update your Cordova plugins, Cordova will overwrite the Podfile in your Xcode project. This means you'll need to repeat this process anytime you modify your Cordova plugins.
{% endalert %}

{% multi_lang_include cordova/prerequisites.md %}

## Rich push notifications
### Rich push notifications

### Step 1: Create a notification service extension
#### Step 1: Create a notification service extension

In your Xcode project, create a notification service extension. For a full walkthrough, see [iOS Rich Push Notifications Tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/b2-rich-push-notifications).

### Step 2: Add a new target
#### Step 2: Add a new target

Open your Podfile and add `BrazeNotificationService` to the notification service extension target [you just created](#step-1-create-a-notification-service-extension). If `BrazeNotificationService` is already added to a target, remove it before continuing. To avoid duplicate symbol errors, use static linking.

Expand All @@ -47,7 +53,7 @@ target 'MyAppRichNotificationService' do
end
```

### Step 3: Reinstall your CocoaPods dependencies
#### Step 3: Reinstall your CocoaPods dependencies

In the terminal, go to your project's iOS directory and reinstall your CocoaPod dependencies.

Expand All @@ -56,13 +62,13 @@ cd PATH_TO_PROJECT/platform/ios
pod install
```

## Push stories
### Push stories

### Step 1: Create a notification content extension
#### Step 1: Create a notification content extension

In your Xcode project, create a notification content extension. For a full walkthrough, see [iOS Push Stories Tutorial](https://braze-inc.github.io/braze-swift-sdk/tutorials/braze/b3-push-stories/).

### Step 2: Configure your push app group
#### Step 2: Configure your push app group

In your project's `config.xml` file, configure the push app group [you just created](#step-1-create-a-notification-content-extension).

Expand All @@ -76,7 +82,7 @@ Replace `PUSH_APP_GROUP` with the name of your push app group. Your `config.xml`
<preference name="com.braze.ios_push_app_group" value="MyPushAppGroup" />
```

### Step 3: Add a new target
#### Step 3: Add a new target

Open your Podfile and add `BrazePushStory` to the notification content extension target [you created previously](#step-1-create-a-notification-content-extension). To avoid duplicate symbol errors, use static linking.

Expand All @@ -96,7 +102,7 @@ target 'MyAppNotificationContentExtension' do
end
```

### Step 4: Reinstall your CocoaPods dependencies
#### Step 4: Reinstall your CocoaPods dependencies

In the terminal, go to your iOS directory and reinstall your CocoaPod dependencies.

Expand Down