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

[BD-3275] Cordova cleanup #8674

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
@@ -1,14 +1,14 @@
---
nav_title: Analytics
article_title: Analytics integration
page_order: 3
page_order: 5
---

# Analytics integration

> Learn how to integrate analytics for the Cordova Braze SDK.

{% multi_lang_include cordova/prerequisites.md %}
{% multi_lang_include developer_guide/prerequisites/cordova.md %}

## Logging custom events

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
nav_title: Content Cards
article_title: Content Cards integration
page_order: 2
page_order: 3
---

# Content Cards integration

> Learn how to integrate Content Cards for the Cordova Braze SDK.

{% multi_lang_include cordova/prerequisites.md %}
{% multi_lang_include developer_guide/prerequisites/cordova.md %}

## Card Feeds

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
nav_title: In-App Messages
page_order: 2
description: "This landing page is home to all things in-app messaging for the Braze Cordova SDK."
platform:
- Cordova
- iOS
- Android
---

# In-app messages

> [In-app messages]({{site.baseurl}}/user_guide/message_building_by_channel/in-app_messages/) help you get content to your user without interrupting their day with a push notification. Customized and tailored in-app messages enhance the user experience and help your audience get the most value from your app. With a variety of layouts and customization tools to choose from, in-app messages engage your users more than ever before. For in-app message examples, check out our [case studies](https://www.braze.com/customers).

{% multi_lang_include developer_guide/prerequisites/cordova.md %}

## Setting up in-app messages

By default the Cordova SDK supports in-app messages with no changes. See the [Android]({{site.baseurl}}/developer_guide/platform_integration_guides/android/in-app_messaging/integration/) or [iOS]({{site.baseurl}}/developer_guide/platform_integration_guides/swift/in-app_messaging/overview/) integration examples for information on customizing in-app messages. Furthermore, you can look at the [sample Cordova application](https://github.com/braze-inc/braze-cordova-sdk/blob/master/sample-project/www/js/index.js) or the sample [Android](https://github.com/braze-inc/braze-android-sdk) or [iOS](https://github.com/braze-inc/braze-swift-sdk) application for implementation samples.

## GIF support

{% multi_lang_include wrappers/gif_support/in_app_messaging.md %}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
page_order: 4
nav_title: News Feed
description: "Learn about News Feed for the Braze Android SDK."
platform:
- Cordova
- Android
- FireOS
channel:
- news feed
---

# News Feed

> Learn about News Feed for the Braze Cordova SDK.

{% multi_lang_include deprecations/braze_sdk/news_feed.md %}

## Prerequisites

THIS.

## Setting up News Feed

See the [Android]({{site.baseurl}}/developer_guide/platform_integration_guides/android/news_feed/integration/) and [iOS]({{site.baseurl}}/developer_guide/platform_integration_guides/legacy_sdks/ios/news_feed/integration/) integration instructions for information on how to integrate the News Feed into your Cordova app. Alternatively, our Cordova plugin provides a method, `launchNewsFeed`, that will launch a modal News Feed without further integration.

The Braze Cordova SDK has several methods to get the number of read or unread News Feed cards for different categories. Check out a [sample project implementation](https://github.com/braze-inc/braze-cordova-sdk/blob/master/sample-project/www/js/index.js) for an example.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,49 @@ description: "This article covers implementing push notifications on Cordova."
channel: push
---

# Push notification integration
# Push notifications

> Learn how to integrate push notifications for the Cordova Braze SDK.
> Learn how to integrate push notifications for the Cordova Braze SDK, including rich push notifications and push stories.

{% multi_lang_include cordova/prerequisites.md %}
## Prerequisites

## Basic push features
Before you can use this feature, you'll need to integrate the [Braze Cordova SDK]({{site.baseurl}}/developer_guide/platform_integration_guides/cordova/sdk_integration/) into your app. After you integrate the SDK, basic push notification functionality is enabled by default. To use [rich push notifications](#setting-up-rich-push-notifications) and [push stories](#setting-up-push-stories), you'll need to set them up individually.

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.
{% alert warning %}
Anytime you add, remove, or update your Cordova plugins, Cordova will overwrite the Podfile in your iOS app's Xcode project. This means you’ll need to set these features up again anytime you modify your Cordova plugins.
{% endalert %}

## Extended push features
## Disabling basic push notifications

{% 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 %}
After you integrate the Braze Cordova SDK, basic push notification functionality is enabled by default. To disable this functionality, add the following to your `config.xml` file. For more information, see [Optional configurations]({{site.baseurl}}/developer_guide/platform_integration_guides/cordova/sdk_integration#optional-configurations).

{% tabs local %}
{% tab iOS %}
```xml
<platform name="ios">
<preference name="com.braze.ios_disable_automatic_push_registration" value="NO" />
<preference name="com.braze.ios_disable_automatic_push_handling" value="NO" />
</platform>
```
{% endtab %}

{% tab Android %}
```xml
<platform name="android">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the android example is currently missing because i cannot find it on the cordova sdk integration page.

<preference name="com.braze.NAME" value="NO" />
<preference name="com.braze.NAME" value="NO" />
</platform>
```
{% endtab %}
{% endtabs %}

### Rich push notifications
## Setting up 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 @@ -53,7 +73,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 @@ -62,13 +82,13 @@ cd PATH_TO_PROJECT/platform/ios
pod install
```

### Push stories
## Setting up 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 @@ -82,7 +102,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 @@ -102,7 +122,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
Loading