Skip to content

Conversation

@arnaud-roland
Copy link
Contributor

This PR remove the Expo support from this repository since it's being migrate to a new dedicated expo plugin (using Expo Modules APIs).

It also rework the android setup, since we dont want to use a custom React Native CLI configuration anymore.

Drop of the support of the old arch is coming in another PR.

# Conflicts:
#	RNBatchPush.podspec
#	plugin/src/withReactNativeBatch.ts
# Conflicts:
#	plugin/src/__tests__/withReactNativeBatchMainActivity.test.ts
#	plugin/src/android/withReactNativeBatchMainActivity.ts
#	plugin/src/fixtures/mainActivity.ts
#	plugin/src/withReactNativeBatch.ts
**Core**
- Batch no longer requires a custom React Native CLI configuration. If `react-native.config.js` only exists for Batch, delete it or remove the `@batch.com/react-native-plugin` entry.

**Android**
Copy link
Contributor

Choose a reason for hiding this comment

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

Pas de changement pour iOS ?

Copy link
Contributor Author

@arnaud-roland arnaud-roland Nov 6, 2025

Choose a reason for hiding this comment

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

nan on a pas de breaking change coté ios, l'init du plugin était déjà manuelle et l'api à pas changée.

@arnaud-roland
Copy link
Contributor Author

@codex review

Copy link
Contributor

@ThomasMengelatte ThomasMengelatte left a comment

Choose a reason for hiding this comment

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

Quel bonheur de voir les creepy tests sur l'appdelegate deleted <3 de voir

String batchAPIKey = resources.getString(resources.getIdentifier("BATCH_API_KEY", "string", packageName));
Batch.start(batchAPIKey);
Batch.EventDispatcher.addDispatcher(eventDispatcher);
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Un interet particulier de le déplacer dans setDefaultConfig ? ou c'est pour la clareté du code ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ouai parce que la valeur est lue via le manifest maintenant et plus par les string resources (sinon ca faisait utiliser un dangerous mod coté expo), donc du tout j'uniformise toute les valeurs lue via le manifest au même endroit (d'ou le rename de la méthode).

try {
Bundle metaData = context.getPackageManager()
.getApplicationInfo(packageName, PackageManager.GET_META_DATA)
.metaData;
if (metaData != null) {
// DnD Initial State
boolean doNotDisturbEnabled = metaData.getBoolean("batch_do_not_disturb_initial_state", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Plus besoin du try ? pour le set a false ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nan la méthode à un fallback

Copy link
Contributor

Choose a reason for hiding this comment

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

ah oui j'avais pas vu 👍

if (app != null) {
initialize(app);
} else {
Log.e(LOGGER_TAG, "Application context is null, cannot initialize Batch module");
Copy link
Contributor

Choose a reason for hiding this comment

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

Utilse de continuer si le context est null ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

normalement on passe jamais là, c'est juste dans le "doute"

ios/RNBatch.mm Outdated
#ifdef RCT_NEW_ARCH_ENABLED
#import <RNBatchSpec/RNBatchSpec.h>
@interface RNBatchModule: RCTEventEmitter <NativeRNBatchModuleSpec>
#else
Copy link
Contributor

Choose a reason for hiding this comment

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

On veut pas drop l'anciene ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

c'est dans une autre PR

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@arnaud-roland arnaud-roland merged commit f118f7b into feature/batch-react-native-v12 Nov 7, 2025
2 checks passed
@arnaud-roland arnaud-roland deleted the feature/remove-expo-support branch November 7, 2025 08:25
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.

3 participants