Skip to content

Commit c9f8e4d

Browse files
committed
chore: remove legacy architecture support, and enforce new architecture requirements
1 parent 92502bf commit c9f8e4d

18 files changed

Lines changed: 227 additions & 675 deletions

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.0.0
2+
- **Breaking:** Removed Legacy Architecture support. Apps must use React Native New Architecture (TurboModules).
3+
14
## 2.2.2
25
### Updates
36
- Added `baseline-browser-mapping`

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,11 @@ View the [API documentation](https://iterable-react-native-sdk.netlify.app).
6969

7070
## Architecture Support
7171

72-
Iterable's React Native SDK supports [React Native's New
73-
Architecture](https://reactnative.dev/architecture/landing-page), including
74-
TurboModules and Fabric.
72+
Iterable's React Native SDK requires [React Native's New
73+
Architecture](https://reactnative.dev/architecture/landing-page).
7574

76-
**IMPORTANT**: Iterable's React Native SDK supports React Native's Legacy Architecture, but it
77-
is no longer actively maintained. Use at your own risk.
78-
79-
Notes:
80-
81-
- Ensure your app is configured for New Architecture per the React Native docs.
82-
- The example app in this repository is configured with New Architecture enabled.
75+
If your React Native version is less than 0.76, ensure your app has New Architecture enabled.
76+
The example app in this repository is configured with New Architecture.
8377

8478
## Beta Versions
8579

android/build.gradle

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@ buildscript {
1515
}
1616
}
1717

18-
def isNewArchitectureEnabled() {
19-
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
20-
}
21-
2218
apply plugin: "com.android.library"
2319
apply plugin: "kotlin-android"
24-
25-
if (isNewArchitectureEnabled()) {
26-
apply plugin: "com.facebook.react"
27-
}
20+
apply plugin: "com.facebook.react"
2821

2922
def getExtOrDefault(name) {
3023
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["RNIterable_" + name]
@@ -59,7 +52,6 @@ android {
5952
defaultConfig {
6053
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
6154
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
62-
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
6355
}
6456

6557
buildFeatures {
@@ -81,16 +73,6 @@ android {
8173
targetCompatibility JavaVersion.VERSION_1_8
8274
}
8375

84-
sourceSets {
85-
main {
86-
if (isNewArchitectureEnabled()) {
87-
java.srcDirs += ['src/newarch']
88-
} else {
89-
java.srcDirs += ['src/oldarch']
90-
}
91-
}
92-
}
93-
9476
// Add this to match the Iterable SDK group ID
9577
group = "com.iterable"
9678
}
@@ -108,4 +90,3 @@ dependencies {
10890
api "com.iterable:iterableapi:3.6.2"
10991
// api project(":iterableapi") // links to local android SDK repo rather than by release
11092
}
111-

android/src/newarch/java/com/RNIterableAPIModule.java renamed to android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import com.facebook.react.bridge.ReactApplicationContext;
88
import com.facebook.react.bridge.ReadableArray;
99
import com.facebook.react.bridge.ReadableMap;
10-
import com.iterable.iterableapi.AuthFailure;
11-
import com.iterable.iterableapi.IterableLogger;
1210

1311
public class RNIterableAPIModule extends NativeRNIterableAPISpec {
1412
private final ReactApplicationContext reactContext;

android/src/main/java/com/iterable/reactnative/RNIterableAPIPackage.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() {
3030
@Override
3131
public Map<String, ReactModuleInfo> getReactModuleInfos() {
3232
Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
33-
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
3433
moduleInfos.put(RNIterableAPIModuleImpl.NAME, new ReactModuleInfo(
3534
RNIterableAPIModuleImpl.NAME,
3635
RNIterableAPIModuleImpl.NAME,
3736
false, // canOverrideExistingModule
3837
false, // needsEagerInit
3938
false, // isCxxModule
40-
isTurboModule // isTurboModule
39+
true // isTurboModule
4140
));
4241
return moduleInfos;
4342
}

android/src/oldarch/java/com/RNIterableAPIModule.java

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)