Skip to content

Commit 63c8ef1

Browse files
all: deprecates old architecture support
1 parent e7f984b commit 63c8ef1

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ ___
44
**Plugin**
55
* Updated Batch to 3.1
66
* Batch requires iOS 15.0 or higher and Xcode 16.4
7-
* Batch requires to compile with SDK 36 (Android 16 'Baklava')
7+
* Batch now compiles with SDK 36 (Android 16 'Baklava').
8+
* This is the last version to support the legacy architecture, as React-Native 0.82 no longer allows opting out, and Expo SDK 54 is the final release to include it.
89

910
**Push**
1011
- Added `setShowNotifications` method to control whether android push notifications should be displayed.
1112
- Added `shouldShowNotifications` method to check current android notification display settings.
1213
- Removed `setNotificationTypes` method. You should now use `setShowNotifications` to control whether Batch should display notifications or not. Note that Batch still preserves your previous values and `shouldShowNotifications` will reflect them.
1314

15+
**Messaging**
16+
- Added support for Mobile Landings within the Customer Engagement Platform.
17+
- Added support for In-App Automations within the Customer Engagement Platform.
18+
1419

1520
10.1.2
1621
----

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ As this plugin is built over Batch's Native SDKs, their respective Android and i
1515
- [Help center](https://help.batch.com/en/): answers to most questions you may have during the integration
1616
- [API reference](https://batchlabs.github.io/Batch-React-Native-Plugin/): this documents each of the classes and methods in the Batch React-Native Plugin
1717

18+
# React Native architecture
19+
Batch ships a TurboModule implementation for the React Native New Architecture.
20+
The legacy bridge is still bundled for compatibility but is now deprecated and will be removed in a future release.
21+
Enable the New Architecture to keep receiving updates.
22+
1823
You may also find this guide useful to review after integration to make sure you're ready to go live: [How can I test the integration on iOS?](https://help.batch.com/en/articles/2669866-how-can-i-test-the-integration-on-ios) / [How can I test the integration on Android?](https://help.batch.com/en/articles/2672749-how-can-i-test-the-integration-on-android)
1924

2025
# Releases
@@ -27,4 +32,4 @@ Build instructions are detailed in [BUILDING.md](https://github.com/BatchLabs/Ba
2732
Please refer to our [contributing guidelines](https://github.com/BatchLabs/Batch-React-Native-Plugin/blob/master/CONTRIBUTING.md).
2833

2934
# Credits
30-
Batch-React-Native-Plugin is based on [bamlab's](https://github.com/bamlab/) [React Native plugin](https://github.com/bamlab/react-native-batch-push).
35+
Batch-React-Native-Plugin is based on [bamlab's](https://github.com/bamlab/) [React Native plugin](https://github.com/bamlab/react-native-batch-push).

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ if (isNewArchitectureEnabled()) {
8080
codegenJavaPackageName = "com.batch.batch_rn"
8181
}
8282
}
83-

android/src/oldarch/java/com/batch/batch_rn/RNBatchModule.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@
1717
import java.util.Map;
1818

1919

20+
@Deprecated
2021
public class RNBatchModule extends ReactContextBaseJavaModule {
2122

2223
private final RNBatchModuleImpl impl;
2324

25+
private static final String DEPRECATION_MESSAGE =
26+
"RNBatch old architecture module is deprecated and will be removed in a future release. " +
27+
"Enable the React Native New Architecture to keep receiving updates.";
28+
2429
static {
2530
System.setProperty("batch.plugin.version", RNBatchModuleImpl.PLUGIN_VERSION);
2631
}
@@ -37,14 +42,14 @@ public Map<String, Object> getConstants() {
3742

3843
public static void initialize(Application application) {
3944
Log.d("RNBatchBridge","Init Batch Native Module");
45+
Log.w(RNBatchModuleImpl.LOGGER_TAG, DEPRECATION_MESSAGE);
4046
RNBatchModuleImpl.initialize(application);
4147
}
4248

4349
private static void setDefaultProfileMigrations(Context context, String packageName) {
4450
RNBatchModuleImpl.setDefaultProfileMigrations(context, packageName);
4551
}
4652

47-
4853
public RNBatchModule(ReactApplicationContext reactContext) {
4954
super(reactContext);
5055
this.impl = new RNBatchModuleImpl(reactContext);

ios/RNBatch.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ + (void)start
4242
{
4343
setenv("BATCH_PLUGIN_VERSION", PluginVersion, 1);
4444

45+
#ifndef RCT_NEW_ARCH_ENABLED
46+
NSLog(@"[BatchBridge] React Native old architecture bridge is deprecated and will be removed in a future release. Enable the New Architecture to keep receiving updates.");
47+
#endif
48+
4549
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
4650

4751
// Handling do not disturbed initial state

0 commit comments

Comments
 (0)