diff --git a/apps/AEPSampleApp/extensions/OptimizeView.tsx b/apps/AEPSampleApp/extensions/OptimizeView.tsx
index f0bd8adc..cddc714e 100644
--- a/apps/AEPSampleApp/extensions/OptimizeView.tsx
+++ b/apps/AEPSampleApp/extensions/OptimizeView.tsx
@@ -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:
@@ -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 (
{
{targetProposition.items[0].content}
);
- } else if (targetProposition.items[0].format === TARGET_OFFER_TYPE_JSON) {
+ } else if (targetProposition.items[0].format === 'application/json') {
return (
{
{targetProposition.items[0].content}
);
- } else if (targetProposition.items[0].format === TARGET_OFFER_TYPE_HTML) {
+ } else if (targetProposition.items[0].format === 'text/html') {
return (
{
diff --git a/packages/messaging/README.md b/packages/messaging/README.md
index da93746b..0f1d49a6 100644
--- a/packages/messaging/README.md
+++ b/packages/messaging/README.md
@@ -4,11 +4,11 @@
[](https://www.npmjs.com/package/@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)
@@ -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
@@ -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:
diff --git a/packages/optimize/README.md b/packages/optimize/README.md
index 098215c3..929d2c08 100644
--- a/packages/optimize/README.md
+++ b/packages/optimize/README.md
@@ -1,31 +1,32 @@
-
# React Native AEP Optimize Extension
[](https://www.npmjs.com/package/@adobe/react-native-aepoptimize)
[](https://www.npmjs.com/package/@adobe/react-native-aepoptimize)
-
`@adobe/react-native-aepoptimize` is a wrapper around the iOS and Android [Adobe Experience Platform Optimize Extension](https://developer.adobe.com/client-sdks/documentation/adobe-journey-optimizer-decisioning) to allow for integration with React Native applications.
## Peer Dependencies
The Adobe Experience Platform Optimize extension has the following peer dependency, which must be installed prior to installing the optimize extension:
+
- [Core](../core/README.md)
- [Edge](../edge/README.md)
- [Edge Identity](../edgeidentity/README.md)
## Installation
-See [Requirements and Installation](https://github.com/adobe/aepsdk-react-native#requirements) instructions on the main page
+See [Requirements and Installation](https://github.com/adobe/aepsdk-react-native#requirements) instructions on the main page
Install the `@adobe/react-native-aepoptimize` package:
NPM:
+
```bash
npm install @adobe/react-native-aepoptimize
```
Yarn:
+
```bash
yarn add @adobe/react-native-aepoptimize
```
@@ -36,9 +37,10 @@ yarn add @adobe/react-native-aepoptimize
Initialization of the SDK should be done in native code, documentation on how to initialize the SDK can be found [here](https://github.com/adobe/aepsdk-react-native#initializing).
-Example:
+Example:
+
+iOS
-iOS
```objectivec
@import AEPCore;
@import AEPLifecycle;
@@ -59,7 +61,8 @@ iOS
@end
```
-Android
+Android
+
```java
import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.InvalidInitException;
@@ -69,7 +72,7 @@ import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Edge;
import com.adobe.marketing.mobile.edge.identity.Identity;
import com.adobe.marketing.mobile.optimize.Optimize;
-
+
...
import android.app.Application;
...
@@ -96,13 +99,18 @@ public class MainApplication extends Application implements ReactApplication {
...
}
}
-}
+}
```
### Importing the extension:
```typescript
-import { Optimize, Offer, Proposition, DecisionScope } from '@adobe/react-native-aepoptimize';
+import {
+ Optimize,
+ Offer,
+ Proposition,
+ DecisionScope
+} from '@adobe/react-native-aepoptimize';
```
## API reference
@@ -110,11 +118,13 @@ import { Optimize, Offer, Proposition, DecisionScope } from '@adobe/react-native
### Clearing the cached Propositions:
**Syntax**
+
```typescript
-clearCachedPropositions()
+clearCachedPropositions();
```
**Example**
+
```typescript
Optimize.clearCachedPropositions();
```
@@ -122,69 +132,105 @@ Optimize.clearCachedPropositions();
### Getting the SDK version:
**Syntax**
+
```typescript
extensionVersion(): Promise
```
**Example**
+
```typescript
Optimize.extensionVersion().then(newVersion => console.log("AdobeExperienceSDK: Optimize version: " + newVersion);
```
### Getting the Cached Propositions:
+
This API returns the cached propositions for the provided DecisionScopes from the in-memory Proposition cache.
**Syntax**
+
```typescript
getPropositions(decisionScopes: Array): Promise