@adobe/react-native-aepmessaging 1.0.0-alpha.2 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/js/{AEPMessaging.js → Messaging.js} +0 -0
- package/js/index.d.ts +1 -1
- package/js/index.js +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
# React Native
|
|
2
|
+
# React Native Adobe Experience Platform Messaging Extension
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/@adobe/react-native-aepmessaging)
|
|
5
5
|
[](https://www.npmjs.com/package/@adobe/react-native-aepmessaging)
|
|
6
6
|
|
|
7
|
-
`@adobe/react-native-aepmessaging` is a wrapper around the iOS and Android [
|
|
7
|
+
`@adobe/react-native-aepmessaging` is a wrapper around the iOS and Android [Adobe Journey Optimizer Messaging](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-journey-optimizer) to allow for integration with React Native applications.
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
@@ -15,14 +15,23 @@ The messaging extension has the following peer dependenices, which must be insta
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
-
See [Requirements and Installation](https://github.com/adobe/aepsdk-react-native
|
|
18
|
+
See [Requirements and Installation](https://github.com/adobe/aepsdk-react-native#requirements) instructions on the main page
|
|
19
|
+
|
|
20
|
+
Install the `@adobe/react-native-aepmessaging` package:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd MyReactApp
|
|
24
|
+
npm install @adobe/react-native-aepmessaging
|
|
25
|
+
```
|
|
19
26
|
|
|
20
27
|
## Usage
|
|
21
28
|
|
|
22
29
|
### [Messaging](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-journey-optimizer)
|
|
23
30
|
|
|
31
|
+
### Installing and registering the extension with the AEP Mobile Core
|
|
32
|
+
|
|
24
33
|
### Initialization
|
|
25
|
-
Initializing 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).
|
|
34
|
+
Initializing the SDK should be done in native code, additional documentation on how to initialize the SDK can be found [here](https://github.com/adobe/aepsdk-react-native#initializing).
|
|
26
35
|
|
|
27
36
|
Example:
|
|
28
37
|
|
|
@@ -32,6 +41,7 @@ iOS
|
|
|
32
41
|
@import AEPLifecycle;
|
|
33
42
|
@import AEPEdge;
|
|
34
43
|
@import AEPEdgeIdentity;
|
|
44
|
+
@import AEPMessaging;
|
|
35
45
|
...
|
|
36
46
|
@implementation AppDelegate
|
|
37
47
|
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
@@ -57,6 +67,7 @@ import com.adobe.marketing.mobile.LoggingMode;
|
|
|
57
67
|
import com.adobe.marketing.mobile.MobileCore;
|
|
58
68
|
import com.adobe.marketing.mobile.Edge;
|
|
59
69
|
import com.adobe.marketing.mobile.edge.identity;
|
|
70
|
+
import com.adobe.marketing.mobile.Messaging;
|
|
60
71
|
|
|
61
72
|
...
|
|
62
73
|
import android.app.Application;
|
|
@@ -69,8 +80,6 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
69
80
|
...
|
|
70
81
|
MobileCore.setApplication(this);
|
|
71
82
|
MobileCore.setLogLevel(LoggingMode.DEBUG);
|
|
72
|
-
MobileCore.setWrapperType(WrapperType.REACT_NATIVE);
|
|
73
|
-
|
|
74
83
|
try {
|
|
75
84
|
Edge.registerExtension();
|
|
76
85
|
Identity.registerExtension();
|
|
@@ -95,9 +104,17 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
95
104
|
import {AEPMessaging} from '@adobe/react-native-aepmessaging';
|
|
96
105
|
```
|
|
97
106
|
|
|
98
|
-
|
|
107
|
+
## API reference
|
|
108
|
+
### extensionVersion
|
|
109
|
+
|
|
110
|
+
**Syntax**
|
|
111
|
+
```javascript
|
|
112
|
+
extensionVersion(): Promise<string>;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Example**
|
|
99
116
|
```javascript
|
|
100
|
-
|
|
117
|
+
Messaging.extensionVersion().then(version => console.log("AdobeExperienceSDK: Messaging version: " + version));
|
|
101
118
|
```
|
|
102
119
|
|
|
103
120
|
## Configure Adobe Journey Optimizer
|
|
File without changes
|
package/js/index.d.ts
CHANGED
package/js/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/react-native-aepmessaging",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"description": "Adobe Experience Platform support for React Native apps.",
|
|
5
5
|
"homepage": "https://aep-sdks.gitbook.io/docs/",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"name": "Adobe Experience Platform SDK Team"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@adobe/react-native-aepcore": "^1.0.0-
|
|
32
|
-
"@adobe/react-native-aepedge": "^1.0.0-
|
|
33
|
-
"@adobe/react-native-aepedgeidentity": "^1.0.0-
|
|
31
|
+
"@adobe/react-native-aepcore": "^1.0.0-beta",
|
|
32
|
+
"@adobe/react-native-aepedge": "^1.0.0-beta",
|
|
33
|
+
"@adobe/react-native-aepedgeidentity": "^1.0.0-beta",
|
|
34
34
|
"react-native": ">=0.60.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "86ecce95fd1d8f0971c424e1471c6885380c738b"
|
|
40
40
|
}
|