Skip to content

Conversation

@dsoffiantini
Copy link
Contributor

@dsoffiantini dsoffiantini commented May 10, 2022

Description

Contains the AJO Optimize RN package and sample app, as well as Messaging updates that enable In-App-Messaging functionality, and changes to the underlying packages that enable them now that optimize has been released officially.

Motivation and Context

Enables users to install the optimize sdk and use it on their react native apps, and sets them up to test IAM features if they want to

How Has This Been Tested?

Unit tests have been added to all new functionality

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

shtomar-adb and others added 30 commits October 21, 2021 18:09
Updated Readme with following:
1. Installation instructions
2. APIs in AEPOptimize module
Added documentation on following public classes:
- DecisionScope
- Offer
- Proposition
Copy link
Contributor

@cacheung cacheung left a comment

Choose a reason for hiding this comment

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

Some feedback for Optimize.

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Below for line 44,
Add EdgeIdentity to import and registration since it is the dependency.
Add for both Android and iOS registration sample.

@import AEPCore;
@import AEPLifecycle;
@import AEPEdge;
@import AEPOptimize;

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also register for iOS
[AEPMobileCore registerExtensions: @[AEPMobileEdge.class, AEPMobileEdgeIdentity.class, AEPMobileOptimize.class] completion:^

Register for Android
Identity.registerExtension();

Copy link
Contributor

Choose a reason for hiding this comment

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

@dsoffiantini Can we add register AEPMobileEdgeIdentity.class in the sample code?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also add to Android, Identity.registerExtension();
Since EdgeIdentity is a dependency.

Copy link
Contributor

@cacheung cacheung left a comment

Choose a reason for hiding this comment

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

https://github.com/adobe/aepsdk-react-native/blob/optimize/packages/messaging/package.json#L29

"@adobe/react-native-aepcore": "^1.0.0",
"@adobe/react-native-aepedge": "^1.0.0",
"@adobe/react-native-aepedgeidentity": "^1.0.0",

npm install {path to node package file}
```

**Podfile setup for `@adobe/react-native-aepmessaging` v1.0.0-beta.2 with in-app messaging support**
Copy link
Contributor

Choose a reason for hiding this comment

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

Podfile setup for @adobe/react-native-aepmessaging iOS SDK v1.0.0-beta.2 with in-app messaging support

This sounds clearer for iOS version?


**Gradle setup for `@adobe/react-native-aepmessaging` v1.0.0-beta.2 with in-app messaging support**
AEPMessaging Android package v1.1.0 with in-app messaging support is not published to maven yet. In project level build.gradle file of Android project in your RN application add following changes in `allprojects -> repositories`.
**Gradle setup for `@adobe/react-native-aepmessaging` v1.2.0-beta.1 with in-app messaging support**
Copy link
Contributor

Choose a reason for hiding this comment

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

Gradle setup for @adobe/react-native-aepmessaging Android SDK v1.2.0-beta.1 with in-app messaging support

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not clear to me what user need to do for messaging extension by following the Readme.
Let revisit.

...
import android.app.Application;
...
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also register for iOS
[AEPMobileCore registerExtensions: @[AEPMobileEdge.class, AEPMobileEdgeIdentity.class, AEPMobileOptimize.class] completion:^

Register for Android
Identity.registerExtension();

@@ -1,7 +1,7 @@

# React Native Adobe Experience Platform Messaging Extension
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: change all
javascript code block

to
typescript code block

repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need this for Optimize right?

repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Same we don't this for Optimize.

README.md Outdated
| [@adobe/react-native-aepmessaging](./packages/messaging) | [![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) | [Messaging](https://aep-sdks.gitbook.io/docs/beta/iam)
| [@adobe/react-native-aepassurance](./packages/assurance) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepassurance.svg)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) | [Assurance](https://aep-sdks.gitbook.io/docs/foundation-extensions/adobe-experience-platform-assurance)
| [@adobe/react-native-aepassurance](./packages/assurance) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepassurance.svg)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)](https://www.npmjs.com/package/@adobe/react-native-aepassurance) | [Assurance](https://aep-sdks.gitbook.io/docs/foundation-extensions/adobe-experience-platform-assurance)
| [@adobe/react-native-aepoptimize](./packages/optimize) | [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)](https://www.npmjs.com/package/@adobe/react-native-aepoptimize) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepoptimize) | [Optimize](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-journey-optimizer-decisioning)
Copy link
Contributor

Choose a reason for hiding this comment

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

(https://img.shields.io/npm/dm/@adobe/react-native-aepassurance)
The above URL should show the downloads for Assurance, can we correct it with theaepoptimize URL?

"babel-preset-react-native": "5.0.2",
"jest": "^27.5.1",
"lerna": "^4.0.0",
"metro-react-native-babel-preset": "^0.70.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this metro dependency to the sample app level as it should only be used by the sample app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After changing this one, unit tests wont be able to run so it has to stay at this level

@yangyansong-adbe
Copy link
Contributor

https://github.com/adobe/aepsdk-react-native/pull/177/files#diff-e7e2f2b83ea901f4ba22c4027cbee641a70899f27e9d03e5cf95b3cb3bf12acdR45
@dsoffiantini I saw that we have included some messaging changes in this PR. Ideally, we should only update the Optimize extension in optimize branch and then merge the extension branch to staging. If we have to include changes for both extensions in the same PR, can you add some descriptions to this PR?
cc @cacheung

@cacheung
Copy link
Contributor

https://github.com/adobe/aepsdk-react-native/pull/177/files#diff-e7e2f2b83ea901f4ba22c4027cbee641a70899f27e9d03e5cf95b3cb3bf12acdR45
@dsoffiantini I saw that we have included some messaging changes in this PR. Ideally, we should only update the Optimize extension in optimize branch and then merge the extension branch to staging. If we have to include changes for both extensions in the same PR, can you add some descriptions to this PR?
cc @cacheung

Good point for the description. We were providing a local build to the user which had to include Optimize and Messaging. So we have both Optimize and Messaging in this branch. We continued making all the changes in this PR after. @dsoffiantini Once this PR merges in to the Staging, we should also pull the staging down to Messaging branch to make it to the latest.

"@adobe/react-native-aepedgeconsent": "^1.0.0",
"@adobe/react-native-aepedgeidentity": "^1.1.0",
"@adobe/react-native-aepmessaging": "^1.0.0-beta.2",
"@adobe/react-native-aepmessaging": "^1.0.0-beta.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change it back to beta.2 since not releasing Messaging?


**Installation instructions for `@adobe/react-native-aepmessaging` v1.0.0-beta.2 with in-app messaging support**
Download the node package `adobe-react-native-aepmessaging-1.0.0-beta.2.tgz` from [github release](https://github.com/adobe/aepsdk-react-native/releases/tag/%40adobe%2Freact-native-aepmessaging%401.0.0-beta.2) and save it in a folder.
**Installation instructions for `@adobe/react-native-aepmessaging` v1.0.0-beta.3 with in-app messaging support**
Copy link
Contributor

Choose a reason for hiding this comment

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

Change back to beta.2

```bash
cd MyReactApp
npm install {path to node package file}
npm install @adobe/react-native-aepmessaging
Copy link
Contributor

Choose a reason for hiding this comment

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

User should install from the instruction in prerelease md?
Do we want to user to use npm install @adobe/react-native-aepmessaging?


**Podfile setup for `@adobe/react-native-aepmessaging` v1.0.0-beta.2 with in-app messaging support**
The In app Message APIs depends on the AEP Messaging, v1.1.0. This version is not yet published to the Cocoapods but is available in the public [github repository](https://github.com/adobe/aepsdk-messaging-ios/tree/staging). Add the following pod dependency in your applications Podfile under the application target.
**Podfile setup for `@adobe/react-native-aepmessaging` v1.0.0-beta.3 with in-app messaging support**
Copy link
Contributor

Choose a reason for hiding this comment

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

beta.2

{
"name": "@adobe/react-native-aepmessaging",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Change back to 1.0.0-beta.2

Copy link
Contributor

@cacheung cacheung left a comment

Choose a reason for hiding this comment

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

Looks good!!

@dsoffiantini dsoffiantini merged commit 64bdeb2 into staging Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants