Skip to content

Commit

Permalink
Added sample app with new architecture (#424)
Browse files Browse the repository at this point in the history
* Aep sample app with new arch enabled (#388)

Add a sample app with new Arch enabled

* navigation structure fixes (#395)

* optimise integration (#393)

* Lifecycle implementation (#396)

* lifecycle initialisation

* lifecycle implementation fixes

* identity integration with fixes (#397)

* Target view integration build fixes (#399)

* target view integration

* podfile and yarn lock file

* target test mboxes

* build fixes

* Update TargetParameters for platform consistency

* Update README.md

* Update README.md

* CI CD fixes  (#403)

* target view integration

* podfile and yarn lock file

* target test mboxes

* Added messaging config

* Added messaging config

* dependecy fixes

* package fixes

* aepsample app new arch CI/CD fixes

* sample app new arch jest fixes

* Remove unsupported --verbose flag in Expo commands

* simulator installation

* ios 17.2

* removed simulator

* simulator path set

* xcode build fixes

* removed files

* Messaging view (#405)

* Add documentation for Expo Support (#377)

* update docs for Expo support

* update expo.md

* update README

* Add screenshots for docs

* Update docs/expo.md

* Apply suggestions from code review

* address PR comments

* address PR comments

* address PR comments

* address PR comments

* update code snippets
Adobe Mobile SDK setup workaround with Expo from @JoeM-RP, created AdobeBridge.h and AdobeBridge.m to wrap the SDK setup and imported it into AppDelegate.mm.  Thanks for the great solution!

* add info for lifecycle docs

---------

Co-authored-by: Mayank Shekhar <[email protected]>

* Update development doc

Update development doc

* podfile and yarn lock file

* build fixes

* messaging view integration

* messagong view navigation fixes

* Revert "Add documentation for Expo Support (#377)"

This reverts commit 28f814a.

* Revert "podfile and yarn lock file"

This reverts commit 5f52ede.

* Revert "build fixes"

This reverts commit 403cd10.

* router fixes and messagive view added to home screen

---------

Co-authored-by: Ishita Gambhir <[email protected]>
Co-authored-by: Mayank Shekhar <[email protected]>
Co-authored-by: Calise Cheung <[email protected]>

* Places fixes (#404)

* target view integration

* podfile and yarn lock file

* Added messaging config

* Added messaging config

* package fixes

* aepsample app new arch CI/CD fixes

* simulator installation

* ios 17.2

* removed simulator

* removed files

* places sdk fies

* places native module name fixes in android

* places sdk

* places config

* removed unused code

* Update README.md

* Update README.md

* Update README.md

* Read me updated for AEPSampleNewArcEnabled (#394)

* Read me updated for AEPSampleNewArcEnabled

* read me fixes

* Update README.md

* Update README.md

* android app id placeholder consistent with iOS along with read me update

* removed main readme

* native places module fixes

* Added places target navigation on main home page

* added new arch read me

* bump version from 6.0.2 to 6.0.3 (#423)

* Align extension view names with older arc sample app for consistency

* Update README.md

* Update AEPSampleApp Readme

Update AEPSampleApp Readme

* update readme with yarn install

update readme with yarn install

---------

Co-authored-by: Ishita Gambhir <[email protected]>
Co-authored-by: Mayank Shekhar <[email protected]>
Co-authored-by: Calise Cheung <[email protected]>
  • Loading branch information
4 people authored Jan 14, 2025
1 parent 5b447d8 commit a35b315
Show file tree
Hide file tree
Showing 130 changed files with 27,075 additions and 15,531 deletions.
50 changes: 38 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ orbs:
jobs:
unit-test:
docker:
# switch to use node v18.x becaseu of the error: the engine "node" is incompatible with this module. Expected version "^16.10.0 || ^18.0.0 || >=20.0.0". Got "19.7.0"
# Use Node.js 18.x for compatibility with the project dependencies
- image: cimg/node:18.20

steps:
Expand All @@ -18,13 +18,19 @@ jobs:
keys:
- yarn-cache-{{ checksum "yarn.lock" }}

- run: yarn install
- run:
name: Install Node.js and Yarn Dependencies
command: yarn install

- run:
name: Build the Project
command: yarn run build

- save_cache:
key: yarn-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- ./apps/AEPSampleApp/node_modules
- ./apps/AEPSampleAppNewArchEnabled/node_modules

- run:
name: Unit Tests
Expand All @@ -33,20 +39,23 @@ jobs:
build-sample-app-android:
executor:
name: rn/linux_android
# the installed tools within the image: https://hub.docker.com/r/reactnativecommunity/react-native-android/tags
build_image_version: v13.0
resource_class: large

steps:
- checkout

- run:
name: yarn install
name: Install Node.js and Yarn Dependencies
command: yarn install

- run:
name: Build the Project
command: yarn run build

- run:
name: Building Android Sample App
command: yarn sampleapp:android:build
command: yarn sampleappnewarchenabled:android:build

environment:
_JAVA_OPTIONS: "-Xmx4096M -XX:MaxMetaspaceSize=512m"
Expand All @@ -62,25 +71,42 @@ jobs:
keys:
- ios-yarn-cache-{{ checksum "yarn.lock" }}

- run: yarn install
- run:
name: Set Xcode Path
command: sudo xcode-select -s /Applications/Xcode.app

- run:
name: Install Node.js and Yarn Dependencies
command: yarn install

- run:
name: Build the Project
command: yarn run build

- save_cache:
key: ios-yarn-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- ./apps/AEPSampleApp/node_modules
- ./apps/AEPSampleAppNewArchEnabled/node_modules

- run:
name: Install latest Cocoapods
name: Install Cocoapods
command: sudo gem install cocoapods

- run:
name: Install pods
command: yarn sampleapp:ios:pod:install
name: Install Pods
command: yarn sampleappnewarchenabled:ios:pod:install

- run:
name: Building iOS Sample App
command: cd apps/AEPSampleApp && npx react-native run-ios --verbose --terminal terminal
command: |
cd apps/AEPSampleAppNewArchEnabled/ios
xcodebuild \
-workspace AEPSampleAppNewArchEnabled.xcworkspace \
-scheme AEPSampleAppNewArchEnabled \
-sdk iphonesimulator \
-destination "generic/platform=iOS Simulator" \
clean build
workflows:
version: 2.1
Expand Down
39 changes: 37 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# Comment in the public line below if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

Expand All @@ -103,12 +103,47 @@ dist
# TernJS port file
.tern-port

# Build output
build/

## User settings
xcuserdata/
packages/.DS_Store

dist/
test/.DS_Store

.yarn/
.yarn/

# Ignore all .properties, .lock, .bin, and other build output files inside the .gradle directory
**/android/gradle/**/*.lock
**/android/gradle/**/*.bin

# Ignore Gradle build directories and cache files
.gradle/
**/build/
**/.gradle/

# Ignore all Eclipse settings and metadata files
**/.settings/

# IntelliJ IDEA project files
.idea/

# File-based project format
*.iws

# IntelliJ
out/

# Exclude all Android Studio/IntelliJ generated files
**/android/.idea/
**/android/.gradle/
**/android/build/

# Ignore all .idea directories across the project
**/.idea/

# Ignore VSCode settings
.vscode/
.vscode/settings.json
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,29 @@
## About this project

This repository is a monorepo and contains a collection of React Native modules for Adobe Experience Platform Mobile SDK as listed below. These modules can be found in the [packages](./packages) directory.
| Package Name | Latest Version | Native Extension |
| ---- | ---- | ---- |
| [@adobe/react-native-aepcore (required)](./packages/core) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepcore.svg)](https://www.npmjs.com/package/@adobe/react-native-aepcore) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepcore)](https://www.npmjs.com/package/@adobe/react-native-aepcore) | [Mobile Core](https://developer.adobe.com/client-sdks/documentation/mobile-core)
| [@adobe/react-native-aepuserprofile](./packages/userprofile) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepuserprofile.svg)](https://www.npmjs.com/package/@adobe/react-native-aepuserprofile) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepuserprofile)](https://www.npmjs.com/package/@adobe/react-native-aepuserprofile)| [Profile](https://developer.adobe.com/client-sdks/documentation/profile)
| [@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)
| [@adobe/react-native-aepplaces](./packages/places) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepplaces.svg)](https://www.npmjs.com/package/@adobe/react-native-aepplaces) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepplaces) | [Places](https://developer.adobe.com/client-sdks/documentation/places)
| [@adobe/react-native-aeptarget](./packages/target) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aeptarget.svg)](https://www.npmjs.com/package/@adobe/react-native-aeptarget) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aeptarget) | [Target](https://developer.adobe.com/client-sdks/documentation/adobe-target)
| [@adobe/react-native-aepcampaignclassic](./packages/campaignclassic) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepcampaignclassic.svg)](https://www.npmjs.com/package/@adobe/react-native-aepcampaignclassic) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepcampaignclassic)](https://www.npmjs.com/package/@adobe/react-native-aepcampaignclassic) |[CampaignClassic](https://developer.adobe.com/client-sdks/documentation/adobe-campaign-classic)
| Package Name | Latest Version | Native Extension | New Architecture Compatibility |
| ---- | ---- | ---- | ---- |
| [@adobe/react-native-aepcore (required)](./packages/core) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepcore.svg)](https://www.npmjs.com/package/@adobe/react-native-aepcore) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepcore)](https://www.npmjs.com/package/@adobe/react-native-aepcore) | [Mobile Core](https://developer.adobe.com/client-sdks/documentation/mobile-core) | Supported |
| [@adobe/react-native-aepuserprofile](./packages/userprofile) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepuserprofile.svg)](https://www.npmjs.com/package/@adobe/react-native-aepuserprofile) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepuserprofile)](https://www.npmjs.com/package/@adobe/react-native-aepuserprofile)| [Profile](https://developer.adobe.com/client-sdks/documentation/profile) | Supported |
| [@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) | Supported |
| [@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) | Supported |
| [@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) | Supported |
| [@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 | Supported |
| [@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/) | Supported |
| [@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) | Supported |
| [@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) | Supported |
| [@adobe/react-native-aepplaces](./packages/places) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepplaces.svg)](https://www.npmjs.com/package/@adobe/react-native-aepplaces) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepplaces) | [Places](https://developer.adobe.com/client-sdks/documentation/places) | Supported |
| [@adobe/react-native-aeptarget](./packages/target) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aeptarget.svg)](https://www.npmjs.com/package/@adobe/react-native-aeptarget) ![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aeptarget) | [Target](https://developer.adobe.com/client-sdks/documentation/adobe-target) | Supported |
| [@adobe/react-native-aepcampaignclassic](./packages/campaignclassic) | [![npm version](https://badge.fury.io/js/%40adobe%2Freact-native-aepcampaignclassic.svg)](https://www.npmjs.com/package/@adobe/react-native-aepcampaignclassic) [![npm downloads](https://img.shields.io/npm/dm/@adobe/react-native-aepcampaignclassic)](https://www.npmjs.com/package/@adobe/react-native-aepcampaignclassic) |[CampaignClassic](https://developer.adobe.com/client-sdks/documentation/adobe-campaign-classic) | Not Supported |

> [!NOTE]
> Since version 5.0.0 of the Adobe React Native SDK, all React Native libraries that share the same major version are compatible with each other.
> [!NOTE]
> The React Native libraries within this repository are specifically designed to support the Android and iOS platforms only.
> [!IMPORTANT]
> The Adobe React Native SDK utilizes the React Native interop layer to ensure compatibility with new architecture.
## Requirements

Expand Down Expand Up @@ -311,6 +313,9 @@ Underlying Objective-C module 'AEPRulesEngine' not found
```
Refer to the solution [here](https://github.com/adobe/aepsdk-react-native/issues/263#issuecomment-1498393770).

## Sample Apps
Refer to the [sample apps](https://github.com/adobe/aepsdk-react-native/tree/main/apps) for example implementations.

## Contributing

Contributions are welcomed! See [CONTRIBUTING](CONTRIBUTING.md) and [development.md](./docs/development.md) guides for more information.
Expand Down
20 changes: 19 additions & 1 deletion apps/AEPSampleApp/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# AEPSampleApp

## Table of Contents
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Get Started](#how-to-run-the-sample-app)
- [Validate with Assurance](#validate-with-assurance)
- [Resources and Troubleshooting](#resources-and-troubleshooting)

## Introduction
This project is a React Native app set up using `react-native-cli`. It serves as a demonstrates of the integration Adobe SDKs with a React Native application.

## Prerequisites

* If you are new to React Native we suggest you follow the [React Native Setting up development environment](https://reactnative.dev/docs/environment-setup) React Native CLI Quickstart page before continuing.
* If you are new to React Native we suggest you follow the older version [React Native Setting up development environment](https://reactnative.dev/docs/0.74/getting-started-without-a-framework) React Native CLI before continuing.
* Cocoapods version >= 1.11.3
* Node version >= 18

Expand All @@ -17,6 +27,14 @@ In `apps/AEPSampleApp/android/app/src/main/java/com/aepsampleapp/MainApplication
> Note: App id is configured in a mobile property in Data Collection UI, in Tags. Refer to [configure with App ID per environment](https://developer.adobe.com/client-sdks/home/base/mobile-core/configuration/#configure-with-app-id-per-environment) page for more information.
### Install dependencies
Go to the **AEPSampleApp** folder and run

```
yarn install
```

Go to the **root directory** and run scripts

> Note: Commands are assuming you're in the root directory of the repository.
```
Expand Down
Loading

0 comments on commit a35b315

Please sign in to comment.