Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 3 additions & 7 deletions apps/AEPSampleApp/extensions/OptimizeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ const ViewTypes = {
content: 1,
};

const TARGET_OFFER_TYPE_TEXT = 'text/plain';
const TARGET_OFFER_TYPE_JSON = 'application/json';
const TARGET_OFFER_TYPE_HTML = 'text/html';

const defaultPropositions = {
textProposition: 'Placeholder Text Offer!!',
imageProposition:
Expand Down Expand Up @@ -122,7 +118,7 @@ export default ({navigation}: any) => {

const renderTargetOffer = () => {
if (targetProposition?.items) {
if (targetProposition.items[0].format === TARGET_OFFER_TYPE_TEXT) {
if (targetProposition.items[0].format === 'text/plain') {
return (
<Text
style={{margin: 10, fontSize: 18}}
Expand All @@ -132,7 +128,7 @@ export default ({navigation}: any) => {
{targetProposition.items[0].content}
</Text>
);
} else if (targetProposition.items[0].format === TARGET_OFFER_TYPE_JSON) {
} else if (targetProposition.items[0].format === 'application/json') {
return (
<Text
style={{margin: 10, fontSize: 18}}
Expand All @@ -142,7 +138,7 @@ export default ({navigation}: any) => {
{targetProposition.items[0].content}
</Text>
);
} else if (targetProposition.items[0].format === TARGET_OFFER_TYPE_HTML) {
} else if (targetProposition.items[0].format === 'text/html') {
return (
<TouchableOpacity
onPress={e => {
Expand Down
12 changes: 5 additions & 7 deletions packages/messaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
[![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepmessaging.svg)](https://www.npmjs.com/package/@adobe/react-native-aepmessaging)
[![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepmessaging)](https://www.npmjs.com/package/@adobe/react-native-aepmessaging)

`@adobe/react-native-aepmessaging` is a wrapper around the iOS and Android [Adobe Journey Optimizer Messaging](https://developer.adobe.com/client-sdks/documentation/adobe-journey-optimizer) to allow for integration with React Native applications.
`@adobe/react-native-aepmessaging` is a wrapper around the iOS and Android [Adobe Journey Optimizer Messaging](https://developer.adobe.com/client-sdks/documentation/iam) to allow for integration with React Native applications.

## Prerequisites

The messaging extension has the following peer dependenices, which must be installed prior to installing the messaging extension:
The messaging extension has the following peer dependencies, which must be installed prior to installing the messaging extension:
- [Core](../core/README.md)
- [Edge](../edge/README.md)
- [Edge Identity](../edgeidentity/README.md)
Expand All @@ -17,12 +17,10 @@ The messaging extension has the following peer dependenices, which must be insta

See [Requirements and Installation](https://github.com/adobe/aepsdk-react-native#requirements) instructions on the main page

**Installation instructions for `@adobe/react-native-aepmessaging` v1.0.0-beta.3 with in-app messaging support**
Clone the `@adobe/react-native-aepmessaging` package from the `messaging` branch on [Github](https://github.com/adobe/aepsdk-react-native/tree/messaging). Place the Messaging package folder into app repo or directory of your choosing. Then you can install the package by running:
Install the `@adobe/react-native-aepmessaging` package:

```bash
cd MyReactApp
npm install {path to messaging package}
npm install @adobe/react-native-aepmessaging
```

## IOS Setup
Expand Down Expand Up @@ -313,7 +311,7 @@ var message: Message;
message.clear();
```

## Programatically control the display of in-app messages
## Programmatically control the display of in-app messages
App developers can now create a type MessagingDelegate in order to be alerted when specific events occur during the lifecycle of an in-app message.

Definition of type MessagingDelegate is:
Expand Down
Loading