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
22 changes: 12 additions & 10 deletions example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
13B07F961A680F5B00A75B9A /* ReactNativeSdkExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeSdkExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeSdkExample/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeSdkExample/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* ReactNativeSdkExample.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = ReactNativeSdkExample.entitlements; path = ReactNativeSdkExample/ReactNativeSdkExample.entitlements; sourceTree = "<group>"; };
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3A95ED4563D4389808EDEA8F /* 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 = "<group>"; };
Expand Down Expand Up @@ -91,6 +92,7 @@
children = (
13B07FB51A68108700A75B9A /* Images.xcassets */,
779227332DFA3FB500D69EC0 /* AppDelegate.swift */,
13B07FB71A68108700A75B9A /* ReactNativeSdkExample.entitlements */,
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
Expand Down Expand Up @@ -277,14 +279,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks.sh\"\n";
Expand Down Expand Up @@ -320,14 +318,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n";
Expand Down Expand Up @@ -430,6 +424,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ReactNativeSdkExample/ReactNativeSdkExample.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = BP98Z28R86;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -460,6 +455,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = ReactNativeSdkExample/ReactNativeSdkExample.entitlements;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = BP98Z28R86;
INFOPLIST_FILE = ReactNativeSdkExample/Info.plist;
Expand Down Expand Up @@ -555,7 +551,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

The change from a string to an array with just a space character seems unusual. This formatting change appears to be converting OTHER_LDFLAGS = "$(inherited) "; to an array format with a space element.

Consider verifying if this change is intentional and necessary, or if it's an artifact from Xcode auto-formatting. If the space is not needed for linking, it would be cleaner to use just "$(inherited)" without the extra space element.

Suggested change
" ",

Copilot uses AI. Check for mistakes.
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -628,7 +627,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

The change from a string to an array with just a space character seems unusual. This formatting change appears to be converting OTHER_LDFLAGS = "$(inherited) "; to an array format with a space element.

Consider verifying if this change is intentional and necessary, or if it's an artifact from Xcode auto-formatting. If the space is not needed for linking, it would be cleaner to use just "$(inherited)" without the extra space element.

Suggested change
" ",

Copilot uses AI. Check for mistakes.
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.web-browser</key>
<true/>
</dict>
</plist>
8 changes: 7 additions & 1 deletion example/src/hooks/useIterableApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useState,
type FunctionComponent,
} from 'react';
import { Alert } from 'react-native';
import { Alert, Platform } from 'react-native';

import {
Iterable,
Expand Down Expand Up @@ -252,6 +252,12 @@ export const IterableAppProvider: FunctionComponent<
'`Iterable.initialize` failed with the following error',
err
);

if (Platform.OS === 'ios' && getUserId()) {
setIsInitialized(true);
return login();
}
Comment on lines +256 to +259
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

This workaround silently swallows initialization errors on iOS and proceeds with login regardless of the actual error. This could mask legitimate initialization failures (such as network issues, invalid configuration, or API key problems) and lead to unpredictable behavior in production.

Instead of catching all errors and assuming initialization succeeded, consider:

  1. Logging the specific error for debugging purposes
  2. Only applying this workaround for the specific iOS initialization issue mentioned in the PR description
  3. Adding a comment explaining what "weird iOS login issue" this addresses
  4. Investigating and properly fixing the underlying iOS initialization issue rather than working around it

Copilot uses AI. Check for mistakes.
Comment on lines +256 to +259
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

This change adds a missing documentation comment explaining what the workaround addresses. The PR description mentions "weird iOS login issue" but doesn't provide specifics about what the issue is or why this workaround is needed.

Add a comment here explaining:

  1. What specific iOS initialization issue this addresses
  2. Whether this is a known bug in the Iterable iOS SDK or a React Native bridge issue
  3. Any relevant ticket numbers or references for tracking the root cause

Copilot uses AI. Check for mistakes.

setIsInitialized(false);
setLoginInProgress(false);
return Promise.reject(err);
Expand Down
4 changes: 4 additions & 0 deletions ios/RNIterableAPI/Serialization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ extension IterableConfig {
config.useInMemoryStorageForInApps = useInMemoryStorageForInApp
}

if let enableEmbeddedMessaging = dict["enableEmbeddedMessaging"] as? Bool {
config.enableEmbeddedMessaging = enableEmbeddedMessaging
}

if let dataRegion = dict["dataRegion"] as? NSNumber {
switch dataRegion {
case 0:
Expand Down
Loading