Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.0.0
- **Breaking:** Removed Legacy Architecture support. Apps must use React Native New Architecture (TurboModules).

## 2.2.2
### Updates
- Added `baseline-browser-mapping`
Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,11 @@ View the [API documentation](https://iterable-react-native-sdk.netlify.app).

## Architecture Support

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

**IMPORTANT**: Iterable's React Native SDK supports React Native's Legacy Architecture, but it
is no longer actively maintained. Use at your own risk.

Notes:

- Ensure your app is configured for New Architecture per the React Native docs.
- The example app in this repository is configured with New Architecture enabled.
If your React Native version is less than 0.76, ensure your app has New Architecture enabled.
The example app in this repository is configured with New Architecture.

## Beta Versions

Expand Down
23 changes: 3 additions & 20 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,9 @@ buildscript {
}
}

def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

if (isNewArchitectureEnabled()) {
apply plugin: "com.facebook.react"
}
apply plugin: "com.facebook.react"

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["RNIterable_" + name]
Expand All @@ -46,7 +39,9 @@ def supportsNamespace() {
android {
if (supportsNamespace()) {
namespace "com.iterable.reactnative"
}

if (supportsNamespace()) {
sourceSets {
main {
manifest.srcFile "src/main/AndroidManifestNew.xml"
Expand All @@ -59,7 +54,6 @@ android {
defaultConfig {
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
}

buildFeatures {
Expand All @@ -81,16 +75,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
main {
if (isNewArchitectureEnabled()) {
java.srcDirs += ['src/newarch']
} else {
java.srcDirs += ['src/oldarch']
}
}
}

// Add this to match the Iterable SDK group ID
group = "com.iterable"
}
Expand All @@ -108,4 +92,3 @@ dependencies {
api "com.iterable:iterableapi:3.6.2"
// api project(":iterableapi") // links to local android SDK repo rather than by release
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.iterable.iterableapi.AuthFailure;
import com.iterable.iterableapi.IterableLogger;

public class RNIterableAPIModule extends NativeRNIterableAPISpec {
private final ReactApplicationContext reactContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() {
@Override
public Map<String, ReactModuleInfo> getReactModuleInfos() {
Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
moduleInfos.put(RNIterableAPIModuleImpl.NAME, new ReactModuleInfo(
RNIterableAPIModuleImpl.NAME,
RNIterableAPIModuleImpl.NAME,
false, // canOverrideExistingModule
false, // needsEagerInit
false, // isCxxModule
isTurboModule // isTurboModule
true // isTurboModule
));
return moduleInfos;
}
Expand Down
273 changes: 0 additions & 273 deletions android/src/oldarch/java/com/RNIterableAPIModule.java

This file was deleted.

Loading
Loading