Skip to content

Commit

Permalink
Merge pull request #264 from adobe/staging
Browse files Browse the repository at this point in the history
Staging -> Main Edge Bridge release
  • Loading branch information
cacheung authored Apr 5, 2023
2 parents 43e32d7 + 24fac1f commit 3222df7
Show file tree
Hide file tree
Showing 35 changed files with 1,056 additions and 55 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,5 @@ build/
xcuserdata/
packages/.DS_Store

js/
js/
test/.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Adobe
Copyright 2023 Adobe

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
19 changes: 0 additions & 19 deletions PRERELEASE.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This repository is a monorepo and contains a collection of React Native modules
| [@adobe/react-native-aepedge](./packages/edge) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedge.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedge) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedge)](https://www.npmjs.com/package/@adobe/react-native-aepedge) | [Edge](https://developer.adobe.com/client-sdks/documentation/edge-network)
| [@adobe/react-native-aepedgeidentity](./packages/edgeidentity) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedgeidentity.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedgeidentity) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedgeidentity)](https://www.npmjs.com/package/@adobe/react-native-aepedgeidentity) |[EdgeIdentity](https://developer.adobe.com/client-sdks/documentation/identity-for-edge-network)
| [@adobe/react-native-aepedgeconsent](./packages/edgeconsent) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedgeconsent.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedgeconsent) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedgeconsent)](https://www.npmjs.com/package/@adobe/react-native-aepedgeconsent) | [EdgeConsent](https://developer.adobe.com/client-sdks/documentation/consent-for-edge-network)
| [@adobe/react-native-aepedgebridge](./packages/edgebridge) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepedgebridge.svg)](https://www.npmjs.com/package/@adobe/react-native-aepedgebridge) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepedgebridge)](https://www.npmjs.com/package/@adobe/react-native-aepedgebridge) | EdgeBridge
| [@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://developer.adobe.com/client-sdks/documentation/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://developer.adobe.com/client-sdks/documentation/platform-assurance-sdk)
| [@adobe/react-native-aepoptimize](./packages/optimize) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepoptimize.svg)](https://www.npmjs.com/package/@adobe/react-native-aepoptimize) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepoptimize) | [Optimize](https://developer.adobe.com/client-sdks/documentation/adobe-journey-optimizer-decisioning)
Expand Down
6 changes: 6 additions & 0 deletions apps/AEPSampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import MessagingView from './extensions/MessagingView';
import CoreView from './extensions/CoreView';
import IdentityView from './extensions/IdentityView';
import ConsentView from './extensions/ConsentView';
import EdgeBridgeView from './extensions/EdgeBridgeView';
import EdgeView from './extensions/EdgeView';
import AssuranceView from './extensions/AssuranceView';
import EdgeIdentityView from './extensions/EdgeIdentityView';
Expand Down Expand Up @@ -50,6 +51,10 @@ function HomeScreen({navigation}: NavigationProps) {
<Button
onPress={() => navigation.navigate('ConsentView')}
title="Consent"
/>
<Button
onPress={() => navigation.navigate('EdgeBridgeView')}
title="Edge Bridge"
/>
<Button
onPress={() => navigation.navigate('AssuranceView')}
Expand Down Expand Up @@ -82,6 +87,7 @@ export default function App() {
<Drawer.Screen name="AssuranceView" component={AssuranceView} />
<Drawer.Screen name="CampaignClassicView" component={CampaignClassicView} />
<Drawer.Screen name="ConsentView" component={ConsentView} />
<Drawer.Screen name="EdgeBridgeView" component={EdgeBridgeView} />
<Drawer.Screen name="EdgeView" component={EdgeView} />
<Drawer.Screen name="EdgeIdentityView" component={EdgeIdentityView} />
<Drawer.Screen name="IdentityView" component={IdentityView} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.adobe.marketing.mobile.Signal;
import com.adobe.marketing.mobile.UserProfile;
import com.adobe.marketing.mobile.edge.consent.Consent;
import com.adobe.marketing.mobile.edge.bridge.EdgeBridge;
import com.adobe.marketing.mobile.optimize.Optimize;
import com.adobe.marketing.mobile.Places;
import com.adobe.marketing.mobile.Target;
Expand Down Expand Up @@ -122,6 +123,7 @@ public void onCreate() {
Signal.EXTENSION,
Edge.EXTENSION,
com.adobe.marketing.mobile.edge.identity.Identity.EXTENSION,
EdgeBridge.EXTENSION,
Messaging.EXTENSION,
UserProfile.EXTENSION,
Assurance.EXTENSION,
Expand Down
46 changes: 46 additions & 0 deletions apps/AEPSampleApp/extensions/EdgeBridgeView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Copyright 2023 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import React, {useState} from 'react';
import {Button, Text, View, ScrollView} from 'react-native';
import {EdgeBridge} from '@adobe/react-native-aepedgebridge';
import {MobileCore} from '@adobe/react-native-aepcore';
import styles from '../styles/styles';
import {NavigationProps} from '../types/props';


const EdgeBridgeView = ({navigation}: NavigationProps) => {
const [version, setVersion] = useState('');
EdgeBridge.extensionVersion().then(version => setVersion(version));


function trackAction() {
MobileCore.trackAction('add_to_cart', {"product.id": "12345", "product.add.event": "1", "product.name": "wide_brim_sunhat", "product.units": "1"});
}

function trackState() {
MobileCore.trackState('hats/sunhat/wide_brim_sunhat_id12345', {"product.name": "wide_brim_sunhat", "product.id": "12345", "product.view.event": "1"});
}

return (
<View style={styles.container}>
<ScrollView contentContainerStyle={{marginTop: 75}}>
<Button onPress={() => navigation.goBack()} title="Go to main page" />
<Text style={styles.welcome}>Edge Bridge v{version}</Text>
<Button title="MobileCore.trackAction()" onPress={trackAction} />
<Button title="MobileCore.trackState()" onPress={trackState} />
</ScrollView>
</View>
);
};

export default EdgeBridgeView;
1 change: 1 addition & 0 deletions apps/AEPSampleApp/ios/AEPSampleApp/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ governing permissions and limitations under the License.
@import AEPEdge;
@import AEPEdgeIdentity;
@import AEPEdgeConsent;
@import AEPEdgeBridge;
@import AEPAssurance;
@import AEPOptimize;
@import AEPPlaces;
Expand Down
2 changes: 1 addition & 1 deletion apps/AEPSampleApp/ios/AEPSampleApp/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ - (BOOL)application:(UIApplication *)application
[AEPMobileCore
registerExtensions:@[
AEPMobileLifecycle.class, AEPMobileIdentity.class, AEPMobileEdgeIdentity.class, AEPMobileEdge.class,
AEPMobileEdgeConsent.class, AEPMobileMessaging.class,
AEPMobileEdgeConsent.class, AEPMobileEdgeBridge.class, AEPMobileMessaging.class,
AEPMobileOptimize.class, AEPMobilePlaces.class, AEPMobileTarget.class,
AEPMobileCampaignClassic.class, AEPMobileAssurance.class
] completion:^{
Expand Down
57 changes: 34 additions & 23 deletions apps/AEPSampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
PODS:
- AEPAssurance (3.0.1):
- AEPAssurance (3.1.0):
- AEPCore (>= 3.1.0)
- AEPServices (>= 3.1.0)
- AEPCampaignClassic (3.0.0):
- AEPCore (>= 3.7.0)
- AEPServices (>= 3.7.0)
- AEPCore (3.7.4):
- AEPRulesEngine (>= 1.1.0)
- AEPServices (>= 3.7.4)
- AEPCore (3.8.1):
- AEPRulesEngine (>= 1.2.2)
- AEPServices (>= 3.8.1)
- AEPEdge (1.6.0):
- AEPCore (>= 3.7.0)
- AEPEdgeIdentity (>= 1.2.0)
- AEPEdgeBridge (1.0.0):
- AEPCore (>= 3.5.0)
- AEPEdgeConsent (1.1.0):
- AEPCore (>= 3.7.0)
- AEPEdge (>= 1.6.0)
- AEPEdgeIdentity (1.2.0):
- AEPCore (>= 3.7.0)
- AEPIdentity (3.7.4):
- AEPCore (>= 3.7.4)
- AEPLifecycle (3.7.4):
- AEPCore (>= 3.7.4)
- AEPMessaging (1.1.1):
- AEPCore (>= 3.7.4)
- AEPIdentity (3.8.1):
- AEPCore (>= 3.8.1)
- AEPLifecycle (3.8.1):
- AEPCore (>= 3.8.1)
- AEPMessaging (1.1.3):
- AEPCore (>= 3.8.1)
- AEPEdge (>= 1.5.0)
- AEPEdgeIdentity (>= 1.1.0)
- AEPServices (>= 3.7.4)
- AEPServices (>= 3.8.1)
- AEPOptimize (1.0.0):
- AEPCore (>= 3.2.0)
- AEPEdge (>= 1.2.0)
- AEPPlaces (3.0.3):
- AEPCore (>= 3.0.0)
- AEPServices (>= 3.0.0)
- AEPRulesEngine (1.2.0)
- AEPServices (3.7.4)
- AEPSignal (3.7.4):
- AEPCore (>= 3.7.4)
- AEPRulesEngine (1.2.2)
- AEPServices (3.8.1)
- AEPSignal (3.8.1):
- AEPCore (>= 3.8.1)
- AEPTarget (3.3.1):
- AEPCore (>= 3.1.0)
- AEPUserProfile (3.0.1):
Expand Down Expand Up @@ -141,6 +143,9 @@ PODS:
- RCTAEPEdge (2.0.0):
- AEPEdge (~> 1.0)
- React
- RCTAEPEdgeBridge (1.0.0):
- AEPEdgeBridge (~> 1.0)
- React
- RCTAEPEdgeConsent (2.0.0):
- AEPEdgeConsent (~> 1.0)
- React
Expand Down Expand Up @@ -501,6 +506,7 @@ DEPENDENCIES:
- RCTAEPCampaignClassic (from `../../../packages/campaignclassic`)
- RCTAEPCore (from `../../../packages/core`)
- RCTAEPEdge (from `../../../packages/edge`)
- RCTAEPEdgeBridge (from `../../../packages/edgebridge`)
- RCTAEPEdgeConsent (from `../../../packages/edgeconsent`)
- RCTAEPEdgeIdentity (from `../../../packages/edgeidentity`)
- RCTAEPMessaging (from `../../../packages/messaging`)
Expand Down Expand Up @@ -548,6 +554,7 @@ SPEC REPOS:
- AEPCampaignClassic
- AEPCore
- AEPEdge
- AEPEdgeBridge
- AEPEdgeConsent
- AEPEdgeIdentity
- AEPIdentity
Expand Down Expand Up @@ -597,6 +604,8 @@ EXTERNAL SOURCES:
:path: "../../../packages/core"
RCTAEPEdge:
:path: "../../../packages/edge"
RCTAEPEdgeBridge:
:path: "../../../packages/edgebridge"
RCTAEPEdgeConsent:
:path: "../../../packages/edgeconsent"
RCTAEPEdgeIdentity:
Expand Down Expand Up @@ -675,20 +684,21 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
AEPAssurance: b25880cd4b14f22c61a1dce19807bd0ca0fe9b17
AEPAssurance: cea6c6b08a1ff6e5025f3ae79a68a1619c49cb4e
AEPCampaignClassic: cd20252606d9e12d5ee2c410df260762faa49d2c
AEPCore: 4f2d6af62f492e87a6cc9cbf4c89ae6f0ea89d81
AEPCore: 460eb0a7cc85180a4b77ac204cf8a7711d1341b8
AEPEdge: e4364a56d358c517f7d4cef87570ac4e7652d3a2
AEPEdgeBridge: de9813a9d8f44ee09f57240ab7626570d23fcd5f
AEPEdgeConsent: d10d4232615b880d484050edf47b2e3fbfb787bb
AEPEdgeIdentity: 6bb2c1e62d48cdc988b4d492e8e6d563f0ced73d
AEPIdentity: 4e298be480b327dd1fbb89e74210001bbbbb1c81
AEPLifecycle: 64107400233d9add603a87d2a4b36002bccb0129
AEPMessaging: 622f4d45f21729b357452a79c67d0f3bc36045a8
AEPIdentity: 8bf62ac575ce91f8063bb0154c398f0358fefb82
AEPLifecycle: 7b9dd2fd528035c4555ff838f89f9c45e62dbb64
AEPMessaging: 988ad59fa642c491aef4ebf2dc48283abe9fc722
AEPOptimize: 413690f88cb8ae574153a94081331788ca740a91
AEPPlaces: 561e22d5ee6570fcb0b721a47aa7cda2c4f00ec0
AEPRulesEngine: 71228dfdac24c9ded09be13e3257a7eb22468ccc
AEPServices: 1c66ce125f9b3bbd46e42687b6929cd584bffdf4
AEPSignal: d6473de3410183f1f0754b92b2938a571332362e
AEPRulesEngine: 354b4374edefaf5bdfa3336ab9a41a07cbae4afe
AEPServices: 79b5e33655bfaff53e360a0f59e4b59077b75dd0
AEPSignal: 5208f9c32e880394ed688d618703cd9ee43083d9
AEPTarget: 90c732ef32cee5733897e395afdab7242df9762d
AEPUserProfile: 2ddb5ba8e2c22dd8f942992306b050f4be2c2403
boost: a7c83b31436843459a1961bfd74b96033dc77234
Expand All @@ -714,6 +724,7 @@ SPEC CHECKSUMS:
RCTAEPCampaignClassic: 210ff4bddafe2987db76332f350a17200dfaeb27
RCTAEPCore: 2c2e2711e00091d8abea6f5e7bffaf34367c363d
RCTAEPEdge: 49d403c33981d1dd16085d586d561c736d9637e8
RCTAEPEdgeBridge: ddc941530ff1268dd4fa8a7f70b8c79404450198
RCTAEPEdgeConsent: dc4de5eca23da4a4859fea12dca63e89a08f9d2e
RCTAEPEdgeIdentity: 39ad6df51e1d15066ec6d6072b12ec78500e268a
RCTAEPMessaging: d6d2cb608e45a428fb0198d5f78486889f15bd87
Expand Down
1 change: 1 addition & 0 deletions apps/AEPSampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@adobe/react-native-aepcore": "^2.0.0",
"@adobe/react-native-aepedge": "^2.0.0",
"@adobe/react-native-aepedgeconsent": "^2.0.0",
"@adobe/react-native-aepedgebridge": "^1.0.0",
"@adobe/react-native-aepedgeidentity": "^2.0.0",
"@adobe/react-native-aepmessaging": "^1.0.0",
"@adobe/react-native-aepoptimize": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ At this time, the following ACP-prefix libraries can be switched out with their
| @adobe/react-native-acpuserprofile | @adobe/react-native-aepuserprofile |
| @adobe/react-native-acpplaces | @adobe/react-native-aepplaces |
| @adobe/react-native-acpplaces-monitor | NA |
| @adobe/react-native-acpanalytics | NA |
| @adobe/react-native-acpanalytics | NA, workflows supported through [Edge Network](../packages/edge) or [Edge Bridge](../packages/edgebridge) extension. |
| @adobe/react-native-acpmedia | NA |
| @adobe/react-native-acpaudience | NA |
| @adobe/react-native-acptarget | @adobe/react-native-aeptarget |
Expand Down
32 changes: 32 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,38 @@ import {LogLevel} from '@adobe/react-native-aepcore';
MobileCore.setLogLevel(LogLevel.VERBOSE);
```

- #### trackAction

Track event actions that occur in your application.

**Syntax**

```typescript
trackAction(action?: string, contextData?: Record<string, string>)
```

**Example**

```typescript
MobileCore.trackAction("loginClicked", {"customKey": "value"});
```

- #### trackState

Track states that represent screens or views in your application.

**Syntax**

```typescript
trackState(state?: string, contextData?: Record<string, string>)
```

**Example**

```typescript
MobileCore.trackState("homePage", {"customKey": "value"});
```

- #### updateConfiguration

Update the configuration programmatically by passing configuration keys and values to override the existing configuration.
Expand Down
10 changes: 7 additions & 3 deletions packages/edge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ iOS
AEPMobileEdge.class
];

[AEPMobileCore configureWithAppId: ENVIRONMENT_FILE_ID];
[AEPMobileCore registerExtensions:extensionsToRegister completion:^{
[AEPMobileCore configureWithAppId: ENVIRONMENT_FILE_ID];
...
}];
return YES;
Expand Down Expand Up @@ -82,7 +83,7 @@ public class MainApplication extends Application implements ReactApplication {
...
MobileCore.setApplication(this);
MobileCore.configureWithAppID("yourAppID");
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);
MobileCore.registerExtensions(
Arrays.asList(Identity.EXTENSION, Edge.EXTENSION),
Expand Down Expand Up @@ -223,4 +224,7 @@ let experienceEvent = new ExperienceEvent(xdmData, data);
// Set the destination Dataset identifier to the current Experience event:
var xdmData = {"eventType" : "SampleXDMEvent"};
let experienceEvent = new ExperienceEvent(xdmData, null, "datasetIdExample")
```
```

## Next steps - Schemas setup and validation with Assurance
For examples on XDM schemas and datasets setup and tips on validating with Assurance, refer to the [Edge Network tutorial](https://github.com/adobe/aepsdk-edge-ios/blob/main/Documentation/Tutorials).
Loading

0 comments on commit 3222df7

Please sign in to comment.