From 5eb7011b5b19c062d67c07f2f9152502ffc1c888 Mon Sep 17 00:00:00 2001 From: Loren Posen Date: Tue, 26 May 2026 18:43:20 -0700 Subject: [PATCH 1/2] refactor: sunset React Native's Legacy Architecture --- README.md | 7 +- android/build.gradle | 41 +-- android/src/main/AndroidManifest.xml | 3 +- android/src/main/AndroidManifestNew.xml | 2 - .../reactnative}/RNIterableAPIModule.java | 0 .../reactnative/RNIterableAPIPackage.java | 3 +- .../oldarch/java/com/RNIterableAPIModule.java | 273 ------------------ example/android/gradle.properties | 6 +- .../project.pbxproj | 69 ----- example/src/NativeJwtTokenModule.ts | 14 +- ios/RNIterableAPI/RNIterableAPI.h | 16 +- ios/RNIterableAPI/RNIterableAPI.mm | 263 +---------------- src/api/index.ts | 8 +- 13 files changed, 22 insertions(+), 683 deletions(-) delete mode 100644 android/src/main/AndroidManifestNew.xml rename android/src/{newarch/java/com => main/java/com/iterable/reactnative}/RNIterableAPIModule.java (100%) delete mode 100644 android/src/oldarch/java/com/RNIterableAPIModule.java diff --git a/README.md b/README.md index d2f597b05..15f923c83 100644 --- a/README.md +++ b/README.md @@ -69,16 +69,13 @@ View the [API documentation](https://iterable-react-native-sdk.netlify.app). ## Architecture Support -Iterable's React Native SDK supports [React Native's New +Iterable's React Native SDK requires [React Native's New Architecture](https://reactnative.dev/architecture/landing-page), including TurboModules and Fabric. -**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. +- Ensure your app has New Architecture enabled per the React Native docs (`newArchEnabled=true` on Android, `RCT_NEW_ARCH_ENABLED=1` on iOS). - The example app in this repository is configured with New Architecture enabled. ## Beta Versions diff --git a/android/build.gradle b/android/build.gradle index 6a3eb970b..83cc37e7d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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] @@ -34,32 +27,15 @@ def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RNIterable_" + name]).toInteger() } -def supportsNamespace() { - def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') - def major = parsed[0].toInteger() - def minor = parsed[1].toInteger() - - // Namespace support was added in 7.3.0 - return (major == 7 && minor >= 3) || major >= 8 -} - android { - if (supportsNamespace()) { - namespace "com.iterable.reactnative" - - sourceSets { - main { - manifest.srcFile "src/main/AndroidManifestNew.xml" - } - } - } + namespace "com.iterable.reactnative" compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") defaultConfig { minSdkVersion getExtOrIntegerDefault("minSdkVersion") targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") - buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()) + buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true") } buildFeatures { @@ -81,16 +57,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" } @@ -108,4 +74,3 @@ dependencies { api "com.iterable:iterableapi:3.6.2" // api project(":iterableapi") // links to local android SDK repo rather than by release } - diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index fbed06f36..a2f47b605 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - + diff --git a/android/src/main/AndroidManifestNew.xml b/android/src/main/AndroidManifestNew.xml deleted file mode 100644 index a2f47b605..000000000 --- a/android/src/main/AndroidManifestNew.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/android/src/newarch/java/com/RNIterableAPIModule.java b/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java similarity index 100% rename from android/src/newarch/java/com/RNIterableAPIModule.java rename to android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java diff --git a/android/src/main/java/com/iterable/reactnative/RNIterableAPIPackage.java b/android/src/main/java/com/iterable/reactnative/RNIterableAPIPackage.java index 3fade361b..17d093d2c 100644 --- a/android/src/main/java/com/iterable/reactnative/RNIterableAPIPackage.java +++ b/android/src/main/java/com/iterable/reactnative/RNIterableAPIPackage.java @@ -30,14 +30,13 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() { @Override public Map getReactModuleInfos() { Map 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; } diff --git a/android/src/oldarch/java/com/RNIterableAPIModule.java b/android/src/oldarch/java/com/RNIterableAPIModule.java deleted file mode 100644 index ce0a6280c..000000000 --- a/android/src/oldarch/java/com/RNIterableAPIModule.java +++ /dev/null @@ -1,273 +0,0 @@ -package com.iterable.reactnative; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.facebook.react.bridge.Callback; -import com.facebook.react.bridge.Promise; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; - -public class RNIterableAPIModule extends ReactContextBaseJavaModule { - private final ReactApplicationContext reactContext; - private static RNIterableAPIModuleImpl moduleImpl; - - RNIterableAPIModule(ReactApplicationContext context) { - super(context); - this.reactContext = context; - if (moduleImpl == null) { - moduleImpl = new RNIterableAPIModuleImpl(reactContext); - } - } - - @NonNull - @Override - public String getName() { - return RNIterableAPIModuleImpl.NAME; - } - - @ReactMethod - public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, String version, Promise promise) { - moduleImpl.initializeWithApiKey(apiKey, configReadableMap, version, promise); - } - - @ReactMethod - public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String version, String apiEndPointOverride, Promise promise) { - moduleImpl.initialize2WithApiKey(apiKey, configReadableMap, version, apiEndPointOverride, promise); - } - - @ReactMethod - public void setEmail(@Nullable String email, @Nullable String authToken) { - moduleImpl.setEmail(email, authToken); - } - - @ReactMethod - public void updateEmail(String email, @Nullable String authToken) { - moduleImpl.updateEmail(email, authToken); - } - - @ReactMethod - public void getEmail(Promise promise) { - moduleImpl.getEmail(promise); - } - - @ReactMethod - public void sampleMethod(String stringArgument, int numberArgument, Callback callback) { - moduleImpl.sampleMethod(stringArgument, numberArgument, callback); - } - - @ReactMethod - public void setUserId(@Nullable String userId, @Nullable String authToken) { - moduleImpl.setUserId(userId, authToken); - } - - @ReactMethod - public void updateUser(ReadableMap dataFields, boolean mergeNestedObjects) { - moduleImpl.updateUser(dataFields, mergeNestedObjects); - } - - @ReactMethod - public void getUserId(Promise promise) { - moduleImpl.getUserId(promise); - } - - @ReactMethod - public void trackEvent(String name, @Nullable ReadableMap dataFields) { - moduleImpl.trackEvent(name, dataFields); - } - - @ReactMethod - public void updateCart(ReadableArray items) { - moduleImpl.updateCart(items); - } - - @ReactMethod - public void trackPurchase(double total, ReadableArray items, @Nullable ReadableMap dataFields) { - moduleImpl.trackPurchase(total, items, dataFields); - } - - @ReactMethod - public void trackPushOpenWithCampaignId(double campaignId, @Nullable Double templateId, String messageId, boolean appAlreadyRunning, @Nullable ReadableMap dataFields) { - moduleImpl.trackPushOpenWithCampaignId(campaignId, templateId, messageId, appAlreadyRunning, dataFields); - } - - @ReactMethod - public void updateSubscriptions(@Nullable ReadableArray emailListIds, @Nullable ReadableArray unsubscribedChannelIds, @Nullable ReadableArray unsubscribedMessageTypeIds, @Nullable ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) { - moduleImpl.updateSubscriptions(emailListIds, unsubscribedChannelIds, unsubscribedMessageTypeIds, subscribedMessageTypeIds, campaignId, templateId); - } - - @ReactMethod - public void showMessage(String messageId, boolean consume, final Promise promise) { - moduleImpl.showMessage(messageId, consume, promise); - } - - @ReactMethod - public void setReadForMessage(String messageId, boolean read) { - moduleImpl.setReadForMessage(messageId, read); - } - - @ReactMethod - public void removeMessage(String messageId, double location, double deleteSource) { - moduleImpl.removeMessage(messageId, location, deleteSource); - } - - @ReactMethod - public void getHtmlInAppContentForMessage(String messageId, final Promise promise) { - moduleImpl.getHtmlInAppContentForMessage(messageId, promise); - } - - @ReactMethod - public void getAttributionInfo(Promise promise) { - moduleImpl.getAttributionInfo(promise); - } - - @ReactMethod - public void setAttributionInfo(@Nullable ReadableMap attributionInfoReadableMap) { - moduleImpl.setAttributionInfo(attributionInfoReadableMap); - } - - @ReactMethod - public void getLastPushPayload(Promise promise) { - moduleImpl.getLastPushPayload(promise); - } - - @ReactMethod - public void disableDeviceForCurrentUser() { - moduleImpl.disableDeviceForCurrentUser(); - } - - @ReactMethod - public void handleAppLink(String uri, Promise promise) { - moduleImpl.handleAppLink(uri, promise); - } - - @ReactMethod - public void trackInAppOpen(String messageId, double location) { - moduleImpl.trackInAppOpen(messageId, location); - } - - @ReactMethod - public void trackInAppClick(String messageId, double location, String clickedUrl) { - moduleImpl.trackInAppClick(messageId, location, clickedUrl); - } - - @ReactMethod - public void trackInAppClose(String messageId, double location, double source, @Nullable String clickedUrl) { - moduleImpl.trackInAppClose(messageId, location, source, clickedUrl); - } - - @ReactMethod - public void inAppConsume(String messageId, double location, double source) { - moduleImpl.inAppConsume(messageId, location, source); - } - - @ReactMethod - public void getInAppMessages(Promise promise) { - moduleImpl.getInAppMessages(promise); - } - - @ReactMethod - public void getInboxMessages(Promise promise) { - moduleImpl.getInboxMessages(promise); - } - - @ReactMethod - public void getUnreadInboxMessagesCount(Promise promise) { - moduleImpl.getUnreadInboxMessagesCount(promise); - } - - @ReactMethod - public void setInAppShowResponse(double number) { - moduleImpl.setInAppShowResponse(number); - } - - @ReactMethod - public void setAutoDisplayPaused(final boolean paused) { - moduleImpl.setAutoDisplayPaused(paused); - } - - @ReactMethod - public void wakeApp() { - moduleImpl.wakeApp(); - } - - @ReactMethod - public void startSession(ReadableArray visibleRows) { - moduleImpl.startSession(visibleRows); - } - - @ReactMethod - public void endSession() { - moduleImpl.endSession(); - } - - @ReactMethod - public void updateVisibleRows(ReadableArray visibleRows) { - moduleImpl.updateVisibleRows(visibleRows); - } - - @ReactMethod - public void addListener(String eventName) { - moduleImpl.addListener(eventName); - } - - @ReactMethod - public void removeListeners(double count) { - moduleImpl.removeListeners(count); - } - - @ReactMethod - public void passAlongAuthToken(@Nullable String authToken) { - moduleImpl.passAlongAuthToken(authToken); - } - - @ReactMethod - public void pauseAuthRetries(boolean pauseRetry) { - moduleImpl.pauseAuthRetries(pauseRetry); - } - - @ReactMethod - public void syncEmbeddedMessages() { - moduleImpl.syncEmbeddedMessages(); - } - - @ReactMethod - public void startEmbeddedSession() { - moduleImpl.startEmbeddedSession(); - } - - @ReactMethod - public void endEmbeddedSession() { - moduleImpl.endEmbeddedSession(); - } - - @ReactMethod - public void startEmbeddedImpression(String messageId, double placementId) { - moduleImpl.startEmbeddedImpression(messageId, (int) placementId); - } - - @ReactMethod - public void pauseEmbeddedImpression(String messageId) { - moduleImpl.pauseEmbeddedImpression(messageId); - } - - @ReactMethod - public void getEmbeddedMessages(@Nullable ReadableArray placementIds, Promise promise) { - moduleImpl.getEmbeddedMessages(placementIds, promise); - } - - @ReactMethod - public void trackEmbeddedClick(ReadableMap message, String buttonId, String clickedUrl) { - moduleImpl.trackEmbeddedClick(message, buttonId, clickedUrl); - } - - public void sendEvent(@NonNull String eventName, @Nullable Object eventData) { - moduleImpl.sendEvent(eventName, eventData); - } - - void onInboxUpdated() { - moduleImpl.onInboxUpdated(); - } -} diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 49d326c85..21aaeb64b 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -27,11 +27,7 @@ android.useAndroidX=true # ./gradlew -PreactNativeArchitectures=x86_64 reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. +# Required: Iterable's React Native SDK uses TurboModules (New Architecture). newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. diff --git a/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj b/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj index 768843497..19454c038 100644 --- a/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj +++ b/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 77E3B5792EA71A4B001449CE /* JwtTokenModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E3B5762EA71A4B001449CE /* JwtTokenModule.swift */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; A3A40C20801B8F02005FA4C0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */; }; - DDD9C96E1785FEF10EEE61A5 /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 627B7C7165CE568DB5CB8F50 /* libPods-ReactNativeSdkExample.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -38,8 +37,6 @@ 13B07FB71A68108700A75B9A /* ReactNativeSdkExample.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = ReactNativeSdkExample.entitlements; path = ReactNativeSdkExample/ReactNativeSdkExample.entitlements; sourceTree = ""; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 5D6CA6ECC26D5E3B8D778E91 /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = ""; }; - 627B7C7165CE568DB5CB8F50 /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 779227312DFA3FB500D69EC0 /* ReactNativeSdkExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExample-Bridging-Header.h"; sourceTree = ""; }; 779227322DFA3FB500D69EC0 /* ReactNativeSdkExampleTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExampleTests-Bridging-Header.h"; sourceTree = ""; }; 779227332DFA3FB500D69EC0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = ReactNativeSdkExample/AppDelegate.swift; sourceTree = ""; }; @@ -47,7 +44,6 @@ 77E3B5752EA71A4B001449CE /* JwtTokenModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = JwtTokenModule.mm; sourceTree = ""; }; 77E3B5762EA71A4B001449CE /* JwtTokenModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JwtTokenModule.swift; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeSdkExample/LaunchScreen.storyboard; sourceTree = ""; }; - 97E816223ABF0AF81818FFC2 /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -63,7 +59,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DDD9C96E1785FEF10EEE61A5 /* libPods-ReactNativeSdkExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -107,7 +102,6 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 627B7C7165CE568DB5CB8F50 /* libPods-ReactNativeSdkExample.a */, ); name = Frameworks; sourceTree = ""; @@ -149,8 +143,6 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 5D6CA6ECC26D5E3B8D778E91 /* Pods-ReactNativeSdkExample.debug.xcconfig */, - 97E816223ABF0AF81818FFC2 /* Pods-ReactNativeSdkExample.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -180,13 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSdkExample" */; buildPhases = ( - A286DF5F63E46316F3012613 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - C291FA7A286A5A6C809214BF /* [CP] Embed Pods Frameworks */, - DA5584E2135C9BE15A390C81 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -271,62 +260,6 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"\\\"$WITH_ENVIRONMENT\\\" \\\"$REACT_NATIVE_XCODE\\\"\"\n"; }; - A286DF5F63E46316F3012613 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C291FA7A286A5A6C809214BF /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - DA5584E2135C9BE15A390C81 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -420,7 +353,6 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5D6CA6ECC26D5E3B8D778E91 /* Pods-ReactNativeSdkExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -453,7 +385,6 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 97E816223ABF0AF81818FFC2 /* Pods-ReactNativeSdkExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; diff --git a/example/src/NativeJwtTokenModule.ts b/example/src/NativeJwtTokenModule.ts index 464cdc37b..514f746f1 100644 --- a/example/src/NativeJwtTokenModule.ts +++ b/example/src/NativeJwtTokenModule.ts @@ -1,4 +1,4 @@ -import { NativeModules, TurboModuleRegistry } from 'react-native'; +import { TurboModuleRegistry } from 'react-native'; import type { TurboModule } from 'react-native'; export interface Spec extends TurboModule { @@ -10,24 +10,14 @@ export interface Spec extends TurboModule { ): Promise; } -// Try to use TurboModule if available (New Architecture) -// Fall back to NativeModules (Old Architecture) -const isTurboModuleEnabled = - '__turboModuleProxy' in global && - (global as Record).__turboModuleProxy != null; - let JwtTokenModule: Spec | null = null; try { - JwtTokenModule = isTurboModuleEnabled - ? TurboModuleRegistry.getEnforcing('JwtTokenModule') - : NativeModules.JwtTokenModule; + JwtTokenModule = TurboModuleRegistry.getEnforcing('JwtTokenModule'); } catch { - // Module not available - will throw error when used console.warn('JwtTokenModule native module is not available yet'); } -// Create a proxy that throws a helpful error when methods are called const createModuleProxy = (): Spec => { const handler: ProxyHandler = { get(_target, prop) { diff --git a/ios/RNIterableAPI/RNIterableAPI.h b/ios/RNIterableAPI/RNIterableAPI.h index a8b725452..7a5b20833 100644 --- a/ios/RNIterableAPI/RNIterableAPI.h +++ b/ios/RNIterableAPI/RNIterableAPI.h @@ -1,18 +1,10 @@ #import #import +#import +#import +#import +#import -#if RCT_NEW_ARCH_ENABLED - - #import - #import - #import - #import @interface RNIterableAPI : RCTEventEmitter -#else - #import -@interface RNIterableAPI : RCTEventEmitter - -#endif - @end diff --git a/ios/RNIterableAPI/RNIterableAPI.mm b/ios/RNIterableAPI/RNIterableAPI.mm index 025c4dc15..9493cf373 100644 --- a/ios/RNIterableAPI/RNIterableAPI.mm +++ b/ios/RNIterableAPI/RNIterableAPI.mm @@ -1,9 +1,6 @@ #import "RNIterableAPI.h" - -#if RCT_NEW_ARCH_ENABLED - #import "RNIterableAPISpec.h" - #import -#endif +#import "RNIterableAPISpec.h" +#import #import @@ -54,8 +51,6 @@ - (void)sendEventWithName:(NSString *_Nonnull)name result:(double)result { [self sendEventWithName:name body:@(result)]; } -#if RCT_NEW_ARCH_ENABLED - // MARK: - New Architecture functions exposed to JS - (void)startObserving { @@ -343,258 +338,4 @@ - (void)wakeApp { return std::make_shared(params); } -#else - -// MARK: - RCTBridgeModule integration for Legacy Architecture - -RCT_EXPORT_METHOD(startObserving) { - [(ReactIterableAPI *)_swiftAPI startObserving]; -} - -RCT_EXPORT_METHOD(stopObserving) { - [(ReactIterableAPI *)_swiftAPI stopObserving]; -} - -RCT_EXPORT_METHOD( - initializeWithApiKey : (NSString *)apiKey config : (NSDictionary *) - config version : (NSString *)version resolve : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI initializeWithApiKey:apiKey - config:config - version:version - resolver:resolve - rejecter:reject]; -} - -RCT_EXPORT_METHOD( - initialize2WithApiKey : (NSString *)apiKey config : (NSDictionary *) - config version : (NSString *)version apiEndPointOverride : (NSString *) - apiEndPointOverride resolve : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI initialize2WithApiKey:apiKey - config:config - version:version - apiEndPointOverride:apiEndPointOverride - resolver:resolve - rejecter:reject]; -} - -RCT_EXPORT_METHOD(setEmail : (NSString *_Nullable) - email authToken : (NSString *_Nullable)authToken) { - [_swiftAPI setEmail:email authToken:authToken]; -} - -RCT_EXPORT_METHOD(getEmail : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getEmail:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(setUserId : (NSString *_Nullable) - userId authToken : (NSString *_Nullable)authToken) { - [_swiftAPI setUserId:userId authToken:authToken]; -} - -RCT_EXPORT_METHOD(getUserId : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getUserId:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(setInAppShowResponse : (double)inAppShowResponse) { - [_swiftAPI setInAppShowResponse:inAppShowResponse]; -} - -RCT_EXPORT_METHOD(getInAppMessages : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getInAppMessages:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(getInboxMessages : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getInboxMessages:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(getUnreadInboxMessagesCount : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getUnreadInboxMessagesCount:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(showMessage : (NSString *)messageId consume : (BOOL) - consume resolve : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI showMessage:messageId - consume:consume - resolver:resolve - rejecter:reject]; -} - -RCT_EXPORT_METHOD(removeMessage : (NSString *)messageId location : (double) - location source : (double)source) { - [_swiftAPI removeMessage:messageId location:location source:source]; -} - -RCT_EXPORT_METHOD(setReadForMessage : (NSString *)messageId read : (BOOL)read) { - [_swiftAPI setReadForMessage:messageId read:read]; -} - -RCT_EXPORT_METHOD(setAutoDisplayPaused : (BOOL)autoDisplayPaused) { - [_swiftAPI setAutoDisplayPaused:autoDisplayPaused]; -} - -RCT_EXPORT_METHOD(trackEvent : (NSString *)name dataFields : (NSDictionary *) - dataFields) { - [_swiftAPI trackEvent:name dataFields:dataFields]; -} - -RCT_EXPORT_METHOD( - trackPushOpenWithCampaignId : (double)campaignId templateId : (NSNumber *) - templateId messageId : (NSString *)messageId appAlreadyRunning : (BOOL) - appAlreadyRunning dataFields : (NSDictionary *)dataFields) { - [_swiftAPI trackPushOpenWithCampaignId:campaignId - templateId:templateId - messageId:messageId - appAlreadyRunning:appAlreadyRunning - dataFields:dataFields]; -} - -RCT_EXPORT_METHOD(trackInAppOpen : (NSString *)messageId location : (double) - location) { - [_swiftAPI trackInAppOpen:messageId location:location]; -} - -RCT_EXPORT_METHOD(trackInAppClick : (NSString *)messageId location : (double) - location clickedUrl : (NSString *)clickedUrl) { - [_swiftAPI trackInAppClick:messageId location:location clickedUrl:clickedUrl]; -} - -RCT_EXPORT_METHOD(trackInAppClose : (NSString *)messageId location : (double) - location source : (double)source clickedUrl : (NSString *) - clickedUrl) { - [_swiftAPI trackInAppClose:messageId - location:location - source:source - clickedUrl:clickedUrl]; -} - -RCT_EXPORT_METHOD(inAppConsume : (NSString *)messageId location : (double) - location source : (double)source) { - [_swiftAPI inAppConsume:messageId location:location source:source]; -} - -RCT_EXPORT_METHOD(updateCart : (NSArray *)items) { - [_swiftAPI updateCart:items]; -} - -RCT_EXPORT_METHOD(trackPurchase : (double)total items : (NSArray *) - items dataFields : (NSDictionary *)dataFields) { - [_swiftAPI trackPurchase:total items:items dataFields:dataFields]; -} - -RCT_EXPORT_METHOD(updateUser : (NSDictionary *)dataFields mergeNestedObjects : ( - BOOL)mergeNestedObjects) { - [_swiftAPI updateUser:dataFields mergeNestedObjects:mergeNestedObjects]; -} - -RCT_EXPORT_METHOD(updateEmail : (NSString *)email authToken : (NSString *) - authToken) { - [_swiftAPI updateEmail:email authToken:authToken]; -} - -RCT_EXPORT_METHOD(getAttributionInfo : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getAttributionInfo:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(setAttributionInfo : (NSDictionary *)attributionInfo) { - [_swiftAPI setAttributionInfo:attributionInfo]; -} - -RCT_EXPORT_METHOD(disableDeviceForCurrentUser) { - [_swiftAPI disableDeviceForCurrentUser]; -} - -RCT_EXPORT_METHOD(getLastPushPayload : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getLastPushPayload:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(getHtmlInAppContentForMessage : (NSString *) - messageId resolve : (RCTPromiseResolveBlock) - resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getHtmlInAppContentForMessage:messageId - resolver:resolve - rejecter:reject]; -} - -RCT_EXPORT_METHOD(handleAppLink : (NSString *)appLink resolve : ( - RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI handleAppLink:appLink resolver:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD( - updateSubscriptions : (NSArray *)emailListIds unsubscribedChannelIds : ( - NSArray *) - unsubscribedChannelIds unsubscribedMessageTypeIds : (NSArray *) - unsubscribedMessageTypeIds subscribedMessageTypeIds : (NSArray *) - subscribedMessageTypeIds campaignId : (double) - campaignId templateId : (double)templateId) { - [_swiftAPI updateSubscriptions:emailListIds - unsubscribedChannelIds:unsubscribedChannelIds - unsubscribedMessageTypeIds:unsubscribedMessageTypeIds - subscribedMessageTypeIds:subscribedMessageTypeIds - campaignId:campaignId - templateId:templateId]; -} - -RCT_EXPORT_METHOD(startSession : (NSArray *)visibleRows) { - [_swiftAPI startSession:visibleRows]; -} - -RCT_EXPORT_METHOD(endSession) { [_swiftAPI endSession]; } - -RCT_EXPORT_METHOD(updateVisibleRows : (NSArray *)visibleRows) { - [_swiftAPI updateVisibleRows:visibleRows]; -} - -RCT_EXPORT_METHOD(passAlongAuthToken : (NSString *_Nullable)authToken) { - [_swiftAPI passAlongAuthToken:authToken]; -} - -RCT_EXPORT_METHOD(pauseAuthRetries : (BOOL)pauseRetry) { - [_swiftAPI pauseAuthRetries:pauseRetry]; -} - -RCT_EXPORT_METHOD(startEmbeddedSession) { - [_swiftAPI startEmbeddedSession]; -} - -RCT_EXPORT_METHOD(endEmbeddedSession) { - [_swiftAPI endEmbeddedSession]; -} - -RCT_EXPORT_METHOD(syncEmbeddedMessages) { - [_swiftAPI syncEmbeddedMessages]; -} - -RCT_EXPORT_METHOD(getEmbeddedMessages : (NSArray *_Nullable)placementIds resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) { - [_swiftAPI getEmbeddedMessages:placementIds resolver:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(startEmbeddedImpression : (NSString *)messageId placementId : (double)placementId) { - [_swiftAPI startEmbeddedImpression:messageId placementId:placementId]; -} - -RCT_EXPORT_METHOD(pauseEmbeddedImpression : (NSString *)messageId) { - [_swiftAPI pauseEmbeddedImpression:messageId]; -} - -RCT_EXPORT_METHOD(trackEmbeddedClick : (NSDictionary *)message buttonId : (NSString *_Nullable)buttonId clickedUrl : (NSString *_Nullable)clickedUrl) { - [_swiftAPI trackEmbeddedClick:message buttonId:buttonId clickedUrl:clickedUrl]; -} - -RCT_EXPORT_METHOD(wakeApp) { - // Placeholder function -- this method is only used in Android -} - -#endif - @end diff --git a/src/api/index.ts b/src/api/index.ts index 9c327891b..4f0d64ff7 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,6 +1,10 @@ import { NativeModules } from 'react-native'; -import BridgelessModule from './NativeRNIterableAPI'; -export const RNIterableAPI = BridgelessModule ?? NativeModules.RNIterableAPI; +import IterableTurboModule from './NativeRNIterableAPI'; +// Production: TurboModule from codegen (New Architecture). +// Jest: IterableTurboModule is undefined; tests provide MockRNIterableAPI via NativeModules. +const RNIterableAPI = IterableTurboModule ?? NativeModules.RNIterableAPI; + +export { RNIterableAPI }; export default RNIterableAPI; From f1268a4bf652276370f9b87e429a4bf786317156 Mon Sep 17 00:00:00 2001 From: Loren Posen Date: Wed, 27 May 2026 11:55:23 -0700 Subject: [PATCH 2/2] chore: update Xcode project configuration to include new Pods and build phases --- .../project.pbxproj | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj b/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj index 19454c038..6e24f3e1f 100644 --- a/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj +++ b/example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 77E3B5772EA71A4B001449CE /* IterableJwtGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E3B5742EA71A4B001449CE /* IterableJwtGenerator.swift */; }; 77E3B5782EA71A4B001449CE /* JwtTokenModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 77E3B5752EA71A4B001449CE /* JwtTokenModule.mm */; }; 77E3B5792EA71A4B001449CE /* JwtTokenModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E3B5762EA71A4B001449CE /* JwtTokenModule.swift */; }; + 7BABC8E95A78397FCECEA2F0 /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FF85D92A8A84B3F33F67BC54 /* libPods-ReactNativeSdkExample.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; A3A40C20801B8F02005FA4C0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ @@ -37,6 +38,7 @@ 13B07FB71A68108700A75B9A /* ReactNativeSdkExample.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = ReactNativeSdkExample.entitlements; path = ReactNativeSdkExample/ReactNativeSdkExample.entitlements; sourceTree = ""; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 2056597565A00516C0B494AF /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = ""; }; 779227312DFA3FB500D69EC0 /* ReactNativeSdkExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExample-Bridging-Header.h"; sourceTree = ""; }; 779227322DFA3FB500D69EC0 /* ReactNativeSdkExampleTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExampleTests-Bridging-Header.h"; sourceTree = ""; }; 779227332DFA3FB500D69EC0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = ReactNativeSdkExample/AppDelegate.swift; sourceTree = ""; }; @@ -44,7 +46,9 @@ 77E3B5752EA71A4B001449CE /* JwtTokenModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = JwtTokenModule.mm; sourceTree = ""; }; 77E3B5762EA71A4B001449CE /* JwtTokenModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JwtTokenModule.swift; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeSdkExample/LaunchScreen.storyboard; sourceTree = ""; }; + A362BF549FC9765A361E0298 /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + FF85D92A8A84B3F33F67BC54 /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,6 +63,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 7BABC8E95A78397FCECEA2F0 /* libPods-ReactNativeSdkExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -102,6 +107,7 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + FF85D92A8A84B3F33F67BC54 /* libPods-ReactNativeSdkExample.a */, ); name = Frameworks; sourceTree = ""; @@ -143,6 +149,8 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( + A362BF549FC9765A361E0298 /* Pods-ReactNativeSdkExample.debug.xcconfig */, + 2056597565A00516C0B494AF /* Pods-ReactNativeSdkExample.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -172,10 +180,13 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSdkExample" */; buildPhases = ( + 69F36DF6FC66D84AAE2C6376 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 72215817BA6FBD07A244864A /* [CP] Embed Pods Frameworks */, + E112FEFD67C426D6B93F1F1B /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -260,6 +271,62 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"\\\"$WITH_ENVIRONMENT\\\" \\\"$REACT_NATIVE_XCODE\\\"\"\n"; }; + 69F36DF6FC66D84AAE2C6376 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 72215817BA6FBD07A244864A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E112FEFD67C426D6B93F1F1B /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -353,6 +420,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = A362BF549FC9765A361E0298 /* Pods-ReactNativeSdkExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -385,6 +453,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2056597565A00516C0B494AF /* Pods-ReactNativeSdkExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES;