Skip to content

Conversation

akhiljain1907
Copy link
Contributor

@akhiljain1907 akhiljain1907 commented Jul 2, 2025

Added optional callback in update proposition api with onSuccess and onError to provide propositions as well as error(if any). Public Interface looks like-

updatePropositions: (
decisionScopes: Array,
xdm?: Map<string, any>,
data?: Map<string, any>,
onSuccess?: (response: Map<string, Proposition>) => void,
onError?: (error: AEPOptimizeError) => void
) => void;

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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.

@akhiljain1907 akhiljain1907 changed the title Update Proposition with callback support Optimize - Update Proposition with callback support Jul 3, 2025
undefined,
(response) => {
console.log('Callback received:', response);
setCallbackLog(JSON.stringify(response, null, 2));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we replace the hardcoded number literal with a constant that has a meaningful name? This will help improve code readability and make it easier for everyone to understand its purpose.

SDK Version:: {version}
</Text>
<Text style={styles.welcome}>Callback Log:</Text>
<Text style={{...styles.text, fontFamily: 'monospace', backgroundColor: '#f0f0f0', padding: 10}}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's extract these inline styles into a new codeText style object inside the styles file.
codeText: { fontFamily: 'monospace', backgroundColor: '#f0f0f0', padding: 10, },

for (const [key, value] of Object.entries(response.propositions)) {
convertedPropositions[key] = new Proposition(value);
}
response.propositions = convertedPropositions;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of mutating response.propositions directly, consider creating a new object using an immutable pattern. This helps avoid potential side effects from modifying native responses.

const finalResponse: UpdatePropositionsResponse = {
  ...response,
  propositions: response.propositions
    ? Object.fromEntries(
        Object.entries(response.propositions).map(
          ([key, value]) => [key, new Proposition(value)]
        )
      )
    : undefined
};
callback(finalResponse);

undefined,
(response) => {
console.log('Callback received:', response);
setCallbackLog(JSON.stringify(response, null, 2));
Copy link
Collaborator

Choose a reason for hiding this comment

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

If there’s a possibility of null or undefined values, JSON.stringify might throw an error. You could consider wrapping it in a try-catch block for safety. But if you're certain the data will always be valid, it should be fine as is.


@ReactMethod
public void updatePropositions(final ReadableArray decisionScopesArray, ReadableMap xdm, ReadableMap data) {
public void updatePropositions(final ReadableArray decisionScopesArray, ReadableMap xdm, ReadableMap data, final Callback callback) {
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Annotate Callback as @nullable parameter here.
  2. Callback is now a mandatory parameter here, it needs to be passed as null if no usage is needed to user. Can this be refactored like this, if the API is being changed.
    public void updatePropositions(final ReadableArray decisionScopesArray, ReadableMap xdm, ReadableMap data) { updatePropositions(decisionScopesArray, xdm, data, null) }
    So both the APIs are available one with callback, and one without callback ?

'eyJ4ZG06YWN0aXZpdHlJZCI6Inhjb3JlOm9mZmVyLWFjdGl2aXR5OjE0MWM4NTg2MmRiMDQ4YzkiLCJ4ZG06cGxhY2VtZW50SWQiOiJ4Y29yZTpvZmZlci1wbGFjZW1lbnQ6MTQxYzZkN2VjOTZmOTg2ZCJ9',
);
const decisionScopeTargetMbox = new DecisionScope('demoLoc3');
const decisionScopeTargetMbox = new DecisionScope('akhil-test-mbox');
Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove this before merging to staging

@namArora3112 namArora3112 changed the base branch from main to staging July 24, 2025 10:08
response.putMap("propositions", propositionsWritableMap);
}

return response;
Copy link
Contributor

@navratan-soni navratan-soni Jul 24, 2025

Choose a reason for hiding this comment

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

How are we handling the case, where map is null or empty ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case it will return empty map.

public void removeListeners(Integer count) {}

// Helper method to create callback response
private WritableMap createCallbackResponse(final Map<DecisionScope, OptimizeProposition> propositionsMap) {
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 move this to RCTAEPOptimizeUtil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@ishita-gambhir-adobe ishita-gambhir-adobe left a comment

Choose a reason for hiding this comment

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

Reviewed the JS and Android sections. LGTM
[nit] Please move the helper functions to util classes.

@akhiljain1907 akhiljain1907 changed the base branch from staging to feat/Optimize_Enhancements August 8, 2025 09:19
@akhiljain1907 akhiljain1907 changed the base branch from feat/Optimize_Enhancements to staging August 8, 2025 09:49
@akhiljain1907 akhiljain1907 changed the base branch from staging to feat/Optimize_Enhancements August 8, 2025 09:54
getPropositions: (decisionScopes: Array<DecisionScope>) => Promise<Map<string, Proposition>>
updatePropositions: (decisionScopes: Array<DecisionScope>, xdm?: Map<string, any>, data?: Map<string, any>) => void
getPropositions: (decisionScopes: Array<DecisionScope>) => Promise<Map<string, Proposition>>;
updatePropositions: (
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, it's better to return a Promise here. I also asked Copilot to share some thoughts.

Returning a Promise vs. Using Callbacks

Returning a Promise is generally better for modern JavaScript/TypeScript code because:

  • It allows use of async/await, making code easier to read and maintain.
  • It integrates more naturally with promise-based workflows and error handling (try/catch).
  • It enables chaining and composition with other asynchronous operations.

Callback-based Approach is more traditional:

  • It works well if you need to support environments where Promises aren’t available.
  • However, it can lead to "callback hell" and less readable code when chaining multiple async operations.

Callback Style (current selection):

updatePropositions(scopes, xdm, data, (result) => {
  // handle result
}, (error) => {
  // handle error
});

Promise Style (recommended):

updatePropositions(scopes, xdm, data)
  .then(result => { /* handle result */ })
  .catch(error => { /* handle error */ });

Conclusion:
Yes, returning a Promise is typically better for usability, readability, and consistency with modern async patterns. You could refactor updatePropositions to return a Promise that resolves to the response or rejects with an error, instead of using callbacks. This would make the API more intuitive for developers using async/await.

Choose a reason for hiding this comment

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

We discussed offline about the limitations that @akhiljain1907 mentioned around using Promise based approach here because of the requirement to invoke both the call and fail method asynchronously for the same single request. @yangyansong-adbe bought up a very good point that it would be hard for customers to manage this with callbacks on single-threaded javascript applications. How do you feel about using Promise and providing an array as a response, where you can have individual result or error for each decision scope in the request?

@akhiljain1907
Copy link
Contributor Author

Hi @yangyansong-adbe and @spoorthipujariadobe, thanks a lot for reviewing.

I also wanted to use a promise-based approach and I completely agree that, in general, returning a promise is cleaner than providing callbacks.

However, after discussing with Spoorthi, here’s the limitation we ran into: in this API’s case, both the “call” and “fail” responses can occur asynchronously and independently. That means we might receive:

  1. only a call result
  2. only a fail result
  3. both call and fail results (in any order)

If we used a single promise, we could only resolve or reject once, which doesn’t work for scenarios where both outcomes can be present. The alternative would be to wait for both to complete and then resolve with an object containing both results — but that would require holding the API response until a timeout is reached, which:

isn’t efficient (especially if one result arrives early)

doesn’t work well here since React Native doesn’t currently expose a timeout configuration for this API (default is ~10s, which is too long to delay returning results)

Because of these constraints, I went with two separate callbacks for success and error to ensure the caller gets results as soon as they’re available without unnecessary waiting.

@yangyansong-adbe
Copy link
Contributor

Hi @yangyansong-adbe and @spoorthipujariadobe, thanks a lot for reviewing.

I also wanted to use a promise-based approach and I completely agree that, in general, returning a promise is cleaner than providing callbacks.

However, after discussing with Spoorthi, here’s the limitation we ran into: in this API’s case, both the “call” and “fail” responses can occur asynchronously and independently. That means we might receive:

  1. only a call result
  2. only a fail result
  3. both call and fail results (in any order)

If we used a single promise, we could only resolve or reject once, which doesn’t work for scenarios where both outcomes can be present. The alternative would be to wait for both to complete and then resolve with an object containing both results — but that would require holding the API response until a timeout is reached, which:

isn’t efficient (especially if one result arrives early)

doesn’t work well here since React Native doesn’t currently expose a timeout configuration for this API (default is ~10s, which is too long to delay returning results)

Because of these constraints, I went with two separate callbacks for success and error to ensure the caller gets results as soon as they’re available without unnecessary waiting.

A single Promise can’t represent that because it can only resolve or reject once. So, I don't think there are any straightforward approaches to return a Promise in this case. I agree that the dual-callbacks is the simplest approach.

@akhiljain1907 akhiljain1907 merged commit 2bce1fc into adobe:feat/Optimize_Enhancements Aug 18, 2025
5 checks passed
akhiljain1907 added a commit that referenced this pull request Aug 20, 2025
* Optimize - Update Proposition with callback support (#496)

* initial commit for update proposition api enhancement

* fixed error on clicking update proposition due to null or undefined callback.

* removed redundant code from RCTAEPOptimize.m

* fixed callback signature in api call in Optimize.ts and updated tests

* used separate callback for success and error case as native android sdk calls success and failure separately.

* tests fix and removed callbacklog from testapp

* fixed iOS bridge code to call both success and error callbacks and test update

* fixed android bridge to use AdobeCallbackWithError to provide error callback with AEPoptimize error response

* removed error parameter from createCallBackResponse

* changed public api signature to pass onSuccess and onError as functions instead of objects

* moved createCallbackResponse method from RCTAEPOptimizeModule to RCTAEPOptimizeUtil

* sending propositions map directly instead of sending under response key in successCallback

* added type for AEPOptimizeError and returned AEpOptimizeError type in errorCallback

* fixed index.js

* add displayed and generateDisplayInteractionXDM APIs for multiple offers (#508)

* add displayed API for multiple offers

* add proposition id to Offer class

* add ios impl for displayed api

* add generateDisplayInteractionXDM and UTs

* fix android build errors

* use activity id as unique id for caching

* update cache populate and clear logic

* fix typos

* add exception handling for android data reader util

* fix ios bridge

* add activity and placement fields to util methods

* clean up test app

* update documentation

---------

Co-authored-by: Ishita Gambhir <igambhir@adobe.com>
akhiljain1907 added a commit that referenced this pull request Aug 20, 2025
* Down merge main into staging (#486)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* Down merge main to staging (#489)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* sync (#493)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>
Co-authored-by: Ishita Gambhir <igambhir@adobe.com>

* [MOB-23595] Upgraded lerna version from 4.0.0 to 8.2.2  (#492)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

* upgraded lerna version from 4.0.0 to 8.2.2 to fix vulnerabilities in package.

* updated lerna.json to include app/* in packages.

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>
Co-authored-by: Ishita Gambhir <igambhir@adobe.com>

* Optimize: add APIs for displayed and generateDisplayInteractionXdm for multiple offers (#491)

* add support for multiple display proposition in Optimize

* android api call fix

* update api usage, tests, docs

* fix UTs

* add support for generate display interaction xdm for multiple offers

* preserve proposition weak reference

* address PR comments

* add constants in android

* add handleJavascriptMessage in AEPMessaging (#497)

* add handleJavascriptMessage in AEPMessaging

* fix UTs

* fix UTs

* clear cache when message lifecycle ends

* update docs

* add constants

* update docs

* Revert "add handleJavascriptMessage in AEPMessaging (#497)" (#501)

This reverts commit 5cc7329.

* Revert "Optimize: add APIs for displayed and generateDisplayInteractionXdm fo…" (#502)

This reverts commit e9890d3.

* Main to staging (#515)

* lerna version upgrade

* Down merge main into staging (#486)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* Down merge main to staging (#489)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* sync (#493)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>
Co-authored-by: Ishita Gambhir <igambhir@adobe.com>

* [MOB-23595] Upgraded lerna version from 4.0.0 to 8.2.2  (#492)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------

Co-authored-by: Naman Arora <namarora+adobe@adobe.com>

* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------

Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

---------

Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>

* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

* Down merge main into staging (#486) (#488)

* expo CNG update (#480)

* build error optimize read me updated

* optimize note added

* enable TVOS platform for Edge Bridge

enable TVOS platform for Edge Bridge

* update app podfile to the latest versions

update app podfile to the latest versions

* updated optimize read me for build errors

* location services updates (#475)

* location services updates

* places version bump

* Expo 52 sample app updated  (#471)

* expo 52 upgrade android build working

* expo 52 ios fixes along with splash screen freeze issue fixes

* pod file and yarn lock fixes

* updated yarn lock and other copyright comment

* added plugin for jetifier configuration

* Remove android and ios folders from Git tracking for AEPSampleAppNewArchEnabled

* ios and android folder added to git ignore

* Revert "added plugin for jetifier configuration"

This reverts commit de0ffb2.

* added expo prebuild command

* read me expo sample app updated

---------



* expo simplification doc update (#473)

* removed registeration of sdks

* Update expo.md with expo to support CNG with static frameworks configuration

* addressed review comments and made relevant changes in read me

* Added a note for Expo support in Installation Guide.

---------



---------





* Content cards tutorial (#482)

* docs: 📝 adds content cards tutorial

* diff

* Content cards tutorial (#483)

* docs: 📝 adds content cards tutorial

* docs: 📝 adds docs for content card tracking

* docs: update ContentCards tutorial to use trackContentCardInteraction methods from PR #477 (#485)

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* update node-version for npm publish workflow (#490)

* update node-version for npm publish workflow

* update nvmrc

* upgraded lerna version from 4.0.0 to 8.2.2 to fix vulnerabilities in package.

* updated lerna.json to include app/* in packages.

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>
Co-authored-by: Ishita Gambhir <igambhir@adobe.com>

---------

Co-authored-by: Ishita Gambhir <igambhir@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: akhiljain1907 <akhiljain@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* remove tutorial doc

Tracking info will need to be updated.

---------

Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Ishita Gambhir <igambhir@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>

* Feat- Optimize Enhancements (Callback and Batch Tracking) (#513)

* Optimize - Update Proposition with callback support (#496)

* initial commit for update proposition api enhancement

* fixed error on clicking update proposition due to null or undefined callback.

* removed redundant code from RCTAEPOptimize.m

* fixed callback signature in api call in Optimize.ts and updated tests

* used separate callback for success and error case as native android sdk calls success and failure separately.

* tests fix and removed callbacklog from testapp

* fixed iOS bridge code to call both success and error callbacks and test update

* fixed android bridge to use AdobeCallbackWithError to provide error callback with AEPoptimize error response

* removed error parameter from createCallBackResponse

* changed public api signature to pass onSuccess and onError as functions instead of objects

* moved createCallbackResponse method from RCTAEPOptimizeModule to RCTAEPOptimizeUtil

* sending propositions map directly instead of sending under response key in successCallback

* added type for AEPOptimizeError and returned AEpOptimizeError type in errorCallback

* fixed index.js

* add displayed and generateDisplayInteractionXDM APIs for multiple offers (#508)

* add displayed API for multiple offers

* add proposition id to Offer class

* add ios impl for displayed api

* add generateDisplayInteractionXDM and UTs

* fix android build errors

* use activity id as unique id for caching

* update cache populate and clear logic

* fix typos

* add exception handling for android data reader util

* fix ios bridge

* add activity and placement fields to util methods

* clean up test app

* update documentation

---------

Co-authored-by: Ishita Gambhir <igambhir@adobe.com>

* Read Me update for update proposition api with callback (#514)

* initial commit for update proposition api enhancement

* fixed error on clicking update proposition due to null or undefined callback.

* removed redundant code from RCTAEPOptimize.m

* fixed callback signature in api call in Optimize.ts and updated tests

* used separate callback for success and error case as native android sdk calls success and failure separately.

* tests fix and removed callbacklog from testapp

* fixed iOS bridge code to call both success and error callbacks and test update

* fixed android bridge to use AdobeCallbackWithError to provide error callback with AEPoptimize error response

* removed error parameter from createCallBackResponse

* changed public api signature to pass onSuccess and onError as functions instead of objects

* moved createCallbackResponse method from RCTAEPOptimizeModule to RCTAEPOptimizeUtil

* sending propositions map directly instead of sending under response key in successCallback

* added type for AEPOptimizeError and returned AEpOptimizeError type in errorCallback

* fixed index.js

* read me update

* Version Update for 7.1.0 release (#517)

* initial commit for update proposition api enhancement

* fixed error on clicking update proposition due to null or undefined callback.

* removed redundant code from RCTAEPOptimize.m

* fixed callback signature in api call in Optimize.ts and updated tests

* used separate callback for success and error case as native android sdk calls success and failure separately.

* tests fix and removed callbacklog from testapp

* fixed iOS bridge code to call both success and error callbacks and test update

* fixed android bridge to use AdobeCallbackWithError to provide error callback with AEPoptimize error response

* removed error parameter from createCallBackResponse

* changed public api signature to pass onSuccess and onError as functions instead of objects

* moved createCallbackResponse method from RCTAEPOptimizeModule to RCTAEPOptimizeUtil

* sending propositions map directly instead of sending under response key in successCallback

* added type for AEPOptimizeError and returned AEpOptimizeError type in errorCallback

* fixed index.js

* read me update

* bumped optimize package version for 7.1.0 release

---------

Co-authored-by: Ishita Gambhir <igambhir@adobe.com>
Co-authored-by: namArora3112 <namarora@adobe.com>
Co-authored-by: Calise Cheung <cacheung@adobe.com>
Co-authored-by: Naman Arora <namarora+adobe@adobe.com>
Co-authored-by: Daniel Soffiantini <dsoffiantini@gmail.com>
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.

7 participants