From 22e113c2597dd88cee68df21e696db0c87112038 Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 2 Dec 2026 11:32:08 +0000 Subject: [PATCH 1/5] feat(SDK-873)!: install the iOS SDK through Swift Package Manager CocoaPods trunk is read-only, so Iterable-iOS-SDK 6.7.5 is the last version published there. The podspec now uses React Native's spm_dependency helper (RN 0.75+) to add iterable-swift-sdk to the Pods project, still pinned to 6.7.5 exactly. RNIterableAPI.mm drops the unused IterableSDK.h import, which the Swift package does not ship. README, example README and CHANGELOG cover the migration. --- .gitignore | 4 ++++ CHANGELOG.md | 7 +++++++ Iterable-React-Native-SDK.podspec | 9 +++++++-- README.md | 10 ++++------ example/README.md | 2 +- example/ios/Podfile | 3 +-- ios/RNIterableAPI/RNIterableAPI.mm | 2 -- 7 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 655bf6b15..d0589f25c 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,10 @@ example/ios/Pods Gemfile.lock Podfile.lock +# Swift Package Manager +# +Package.resolved + # Ruby example/vendor/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fa346082..3d9ccf439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ### Breaking changes +- iOS: the SDK now installs Iterable's iOS SDK through Swift Package Manager instead of the `Iterable-iOS-SDK` pod, because CocoaPods trunk is read-only and 6.7.5 is the last version published there (SDK-873). The podspec uses React Native's `spm_dependency` helper (React Native 0.75+, within this SDK's 0.77+ requirement) and still pins iOS SDK 6.7.5 exactly, so `pod install` keeps working as before and Xcode resolves `https://github.com/Iterable/iterable-swift-sdk.git` from GitHub. + - Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets in your `Podfile`. Keeping them fails the build with `Redefinition of module 'IterableSDK'`. + - `use_frameworks! :linkage => :dynamic` is no longer required. Static libraries, static frameworks, and dynamic frameworks all work, on both the New and Legacy Architecture. + - `#import ` no longer resolves in Objective-C++ (`.mm`) files. Call the SDK from Swift or from an Objective-C (`.m`) file with `@import IterableSDK;`. + - A Notification Service Extension that uses `pod 'Iterable-iOS-AppExtensions'` keeps working, but stays on 6.7.5. To get newer versions, remove the pod and add the `IterableAppExtensions` product of `https://github.com/Iterable/iterable-swift-sdk` to the extension target in Xcode, with a dependency rule that allows the iOS SDK version this SDK pins (for example, **Up to Next Major Version** from `6.0.0`). + - Expo: update `@iterable/expo-plugin` together with this release. Earlier plugin versions cannot build against the Swift package. + - Inbox HTML messages no longer forward unknown `iterable://` links to `urlHandler`. `iterable://` is reserved for `iterable://delete` and `iterable://dismiss`. Any other `iterable://` link closes the message and calls no handler. Use `action://name` for custom actions (`customActionHandler`) and your app's own scheme for deep links (`urlHandler`). In inbox messages, `http(s)` links open with `Linking.openURL` and do not call `urlHandler`. ### Fixes diff --git a/Iterable-React-Native-SDK.podspec b/Iterable-React-Native-SDK.podspec index 11ded1b6d..29c8b4a2c 100644 --- a/Iterable-React-Native-SDK.podspec +++ b/Iterable-React-Native-SDK.podspec @@ -16,8 +16,13 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" s.private_header_files = "ios/**/*.h" - # Load Iterables iOS SDK as a dependency - s.dependency "Iterable-iOS-SDK", "6.7.5" + # Load Iterable's iOS SDK through Swift Package Manager. CocoaPods trunk is + # read-only, so 6.7.5 is the last Iterable-iOS-SDK release published there. + spm_dependency(s, + url: "https://github.com/Iterable/iterable-swift-sdk.git", + requirement: { kind: "exactVersion", version: "6.7.5" }, + products: ["IterableSDK"] + ) # Basic Swift support s.pod_target_xcconfig = { diff --git a/README.md b/README.md index efb82954f..5982439b6 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,10 @@ Iterable's React Native SDK relies on: - **iOS** - Xcode 12+ - [Deployment target 13.4+](https://help.apple.com/xcode/mac/current/#/deve69552ee5) - - [Iterable's iOS SDK](https://github.com/Iterable/iterable-swift-sdk) - - **Podfile Configuration**: The linkage must be set to dynamic in your Podfile to load Swift modules that the SDK depends on. Add the following to your Podfile: - ```ruby - use_frameworks! :linkage => :dynamic - ``` - - **Xcode 27:** `run-ios` needs `@react-native-community/cli` **20.2.0+** so it opens Device Hub (`DeviceHub.app`) instead of `Simulator.app`. `xcode-select` must point at the Xcode you are using when more than one version is installed. Xcode 27 also refuses CocoaPods resource-bundle targets below iOS **15.0** (this SDK's `IterableSDKResources` bundle still inherits **12.0** from Iterable-iOS-SDK, including **6.7.5** pinned by RN **3.2.0**). Lift generated Pods targets to **15.1** in the app `Podfile` `post_install` — see this repo's `example/ios/Podfile`. That is a **host** workaround until Iterable's iOS SDK publishes a ≥ 15.1 minimum and this SDK depends on it. It does not change the published Iterable iOS support range. + - [Iterable's iOS SDK](https://github.com/Iterable/iterable-swift-sdk), installed through Swift Package Manager. `pod install` adds the `iterable-swift-sdk` package to the Pods project with React Native's `spm_dependency` helper, so Xcode needs network access to GitHub to resolve it. CocoaPods trunk is read-only, so `Iterable-iOS-SDK` **6.7.5** is the last version published there. + - **Podfile Configuration**: Static libraries (the React Native default), `use_frameworks! :linkage => :static`, and `use_frameworks! :linkage => :dynamic` all work. `pod install` prints an `[SPM] WARNING!!!` about static linking unless `USE_FRAMEWORKS=dynamic`; the SDK is linked once, so the warning does not apply. Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets; keeping them fails the build with `Redefinition of module 'IterableSDK'`. + - **Objective-C++:** `IterableSDK` is a Swift package, so `#import ` no longer resolves from an `AppDelegate.mm`. Call the SDK from Swift, or from an Objective-C (`.m`) file with `@import IterableSDK;`. + - **Xcode 27:** `run-ios` needs `@react-native-community/cli` **20.2.0+** so it opens Device Hub (`DeviceHub.app`) instead of `Simulator.app`. `xcode-select` must point at the Xcode you are using when more than one version is installed. Xcode 27 also refuses Pods targets below iOS **15.0**. Iterable no longer adds one (the `Iterable-iOS-SDK-IterableSDKResources` bundle came from the CocoaPods SDK), but other pods may. If they do, lift generated Pods targets to **15.1** in the app `Podfile` `post_install`, as this repo's `example/ios/Podfile` does. - **Push completion handlers (through at least Iterable-iOS-SDK 6.7.5):** Pass **`nil`** for `IterableAppIntegration`'s completion-handler parameter (as Iterable's native iOS SDK docs describe for passing a nil value) and call the system completion handler yourself—for example `completionHandler(.noData)` on the fetch path and `completionHandler()` on the notification-response path. If the native SDK is not initialized, `IterableAppIntegration` does not invoke a handler you pass in; calling the system handler yourself satisfies iOS either way. When the SDK is initialized, the native integration completes any handler you pass on the same synchronous timing as calling it yourself right after forwarding with `nil`, so this pattern is safe whether or not the SDK is initialized. ```swift diff --git a/example/README.md b/example/README.md index 8d07c8365..ba42e91ae 100644 --- a/example/README.md +++ b/example/README.md @@ -200,7 +200,7 @@ gem install concurrent-ruby -v '< 1.3.4' Xcode 27 replaces `Simulator.app` with Device Hub. `yarn ios` / `yarn example ios` require `@react-native-community/cli` **20.2.0+** (this example already pins it). A `Simulator.app does not exist` error means an older CLI is still on the path, or `xcode-select` points at a different Xcode. -Xcode 27's iOS SDK also rejects any target with `IPHONEOS_DEPLOYMENT_TARGET` below **15.0**, including CocoaPods resource bundles such as `Iterable-iOS-SDK-IterableSDKResources` (12.0 from Iterable-iOS-SDK, including **6.7.5** pinned by RN **3.2.0**). This example's `ios/Podfile` `post_install` lifts generated Pods targets to **15.1**. Copy that lift into a host app Podfile if you hit the same `xcodebuild` 65 error. It does not change Iterable-iOS-SDK's published minimum; that wait is a later iOS SDK release that raises the platform to ≥ 15.1. +Xcode 27's iOS SDK also rejects any target with `IPHONEOS_DEPLOYMENT_TARGET` below **15.0**. Iterable's iOS SDK now comes through Swift Package Manager, so the `Iterable-iOS-SDK-IterableSDKResources` pod bundle that used to trip this check is gone, but other pods can still declare a lower minimum. This example's `ios/Podfile` `post_install` lifts generated Pods targets to **15.1**. Copy that lift into a host app Podfile if you hit the same `xcodebuild` 65 error. ## Xcode 16.3 Issue diff --git a/example/ios/Podfile b/example/ios/Podfile index a2e34b15e..bbee082dc 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -37,8 +37,7 @@ target 'ReactNativeSdkExample' do # Temporary workaround for Xcode 26.x / 27. # fmt 11.0.2 fails consteval checks under Apple Clang 21; compile fmt as C++17 only. # All other pods stay in C++20 (React-perflogger needs std::unordered_map::contains). - # Xcode 27 rejects Pods resource-bundle targets below iOS 15.0 (e.g. - # Iterable-iOS-SDK-IterableSDKResources at 12.0). Lift those generated targets + # Xcode 27 rejects Pods targets below iOS 15.0. Lift those generated targets # to RN's min; do not change published podspec support ranges. installer.pods_project.targets.each do |target| target.build_configurations.each do |config| diff --git a/ios/RNIterableAPI/RNIterableAPI.mm b/ios/RNIterableAPI/RNIterableAPI.mm index e5ee3ee9d..190b0af5a 100644 --- a/ios/RNIterableAPI/RNIterableAPI.mm +++ b/ios/RNIterableAPI/RNIterableAPI.mm @@ -5,8 +5,6 @@ #import #endif -#import - // Forward-declare the Swift protocols/enum used in the Swift header // to avoid compiler errors. @protocol IterableInAppDelegate; From 946b4e25b8791b3261388bc63df1c8d0436f7de5 Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 2 Dec 2026 11:41:53 +0000 Subject: [PATCH 2/5] docs(SDK-873): clarify NSE and Expo migration notes --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9ccf439..d992758d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,10 @@ - iOS: the SDK now installs Iterable's iOS SDK through Swift Package Manager instead of the `Iterable-iOS-SDK` pod, because CocoaPods trunk is read-only and 6.7.5 is the last version published there (SDK-873). The podspec uses React Native's `spm_dependency` helper (React Native 0.75+, within this SDK's 0.77+ requirement) and still pins iOS SDK 6.7.5 exactly, so `pod install` keeps working as before and Xcode resolves `https://github.com/Iterable/iterable-swift-sdk.git` from GitHub. - Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets in your `Podfile`. Keeping them fails the build with `Redefinition of module 'IterableSDK'`. - - `use_frameworks! :linkage => :dynamic` is no longer required. Static libraries, static frameworks, and dynamic frameworks all work, on both the New and Legacy Architecture. + - `use_frameworks! :linkage => :dynamic` is no longer required. Static libraries, static frameworks, and dynamic frameworks all work, and both the New and Legacy Architecture work. - `#import ` no longer resolves in Objective-C++ (`.mm`) files. Call the SDK from Swift or from an Objective-C (`.m`) file with `@import IterableSDK;`. - - A Notification Service Extension that uses `pod 'Iterable-iOS-AppExtensions'` keeps working, but stays on 6.7.5. To get newer versions, remove the pod and add the `IterableAppExtensions` product of `https://github.com/Iterable/iterable-swift-sdk` to the extension target in Xcode, with a dependency rule that allows the iOS SDK version this SDK pins (for example, **Up to Next Major Version** from `6.0.0`). - - Expo: update `@iterable/expo-plugin` together with this release. Earlier plugin versions cannot build against the Swift package. + - A Notification Service Extension that uses `pod 'Iterable-iOS-AppExtensions'` keeps working, but stays on 6.7.5 forever. To have it follow the iOS SDK version this SDK pins in future releases, remove the pod and add the `IterableAppExtensions` product of `https://github.com/Iterable/iterable-swift-sdk` to the extension target in Xcode, with a dependency rule that allows that version (for example, **Up to Next Major Version** from `6.0.0`). Xcode resolves one version of the package for the whole workspace. + - Expo: update `@iterable/expo-plugin` to the release whose peer range includes `^4.0.0`. Earlier plugin versions fail to build `ExpoAdapterIterable` with `no such module 'IterableSDK'`. - Inbox HTML messages no longer forward unknown `iterable://` links to `urlHandler`. `iterable://` is reserved for `iterable://delete` and `iterable://dismiss`. Any other `iterable://` link closes the message and calls no handler. Use `action://name` for custom actions (`customActionHandler`) and your app's own scheme for deep links (`urlHandler`). In inbox messages, `http(s)` links open with `Linking.openURL` and do not call `urlHandler`. From bc34871b2801b8adcec1d8afe4359413c9605b8d Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 2 Dec 2026 14:20:33 +0000 Subject: [PATCH 3/5] ci(SDK-873): build iOS with Xcode 26 and document the requirement Xcode 16.4 passes the Swift package product IterableSDK.o to libtool twice (link file list and explicit input) for the static Iterable-React-Native-SDK pod, so the archive holds two copies and -ObjC makes the app link fail with duplicate IterableSDK symbols. Xcode 26.0 and later add it once. Move the build-ios and CodeQL Swift jobs to Xcode 26.0 and document Xcode 26+. --- .github/workflows/ci.yml | 2 +- .github/workflows/codeql.yml | 2 +- CHANGELOG.md | 1 + README.md | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60f5cf187..b13b8eca7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,7 +126,7 @@ jobs: - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 with: - xcode-version: '16.4' + xcode-version: '26.0' - name: Cache turborepo for iOS uses: actions/cache@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 671815141..b4a5178b5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -177,7 +177,7 @@ jobs: - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 with: - xcode-version: '16.4' + xcode-version: '26.0' - name: Print available simulators run: xcrun simctl list devices | cat diff --git a/CHANGELOG.md b/CHANGELOG.md index d992758d2..f38ecb658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Breaking changes - iOS: the SDK now installs Iterable's iOS SDK through Swift Package Manager instead of the `Iterable-iOS-SDK` pod, because CocoaPods trunk is read-only and 6.7.5 is the last version published there (SDK-873). The podspec uses React Native's `spm_dependency` helper (React Native 0.75+, within this SDK's 0.77+ requirement) and still pins iOS SDK 6.7.5 exactly, so `pod install` keeps working as before and Xcode resolves `https://github.com/Iterable/iterable-swift-sdk.git` from GitHub. + - iOS builds now require Xcode 26 or later. Xcode 16 adds the Swift package's object to the static `Iterable-React-Native-SDK` pod twice, so the app link fails with duplicate `IterableSDK` symbols. - Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets in your `Podfile`. Keeping them fails the build with `Redefinition of module 'IterableSDK'`. - `use_frameworks! :linkage => :dynamic` is no longer required. Static libraries, static frameworks, and dynamic frameworks all work, and both the New and Legacy Architecture work. - `#import ` no longer resolves in Objective-C++ (`.mm`) files. Call the SDK from Swift or from an Objective-C (`.m`) file with `@import IterableSDK;`. diff --git a/README.md b/README.md index 5982439b6..dd32ab668 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Iterable's React Native SDK relies on: - [React Native WebView 13+](https://github.com/react-native-webview/react-native-webview) - **iOS** - - Xcode 12+ + - Xcode 26+. Xcode 16 links the Swift package's `IterableSDK.o` into the static `Iterable-React-Native-SDK` pod twice, which fails the app link with duplicate `IterableSDK` symbols. - [Deployment target 13.4+](https://help.apple.com/xcode/mac/current/#/deve69552ee5) - [Iterable's iOS SDK](https://github.com/Iterable/iterable-swift-sdk), installed through Swift Package Manager. `pod install` adds the `iterable-swift-sdk` package to the Pods project with React Native's `spm_dependency` helper, so Xcode needs network access to GitHub to resolve it. CocoaPods trunk is read-only, so `Iterable-iOS-SDK` **6.7.5** is the last version published there. - **Podfile Configuration**: Static libraries (the React Native default), `use_frameworks! :linkage => :static`, and `use_frameworks! :linkage => :dynamic` all work. `pod install` prints an `[SPM] WARNING!!!` about static linking unless `USE_FRAMEWORKS=dynamic`; the SDK is linked once, so the warning does not apply. Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets; keeping them fails the build with `Redefinition of module 'IterableSDK'`. From 67e139524bb9e5527f338855551c8ddf994df311 Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 2 Dec 2026 14:23:21 +0000 Subject: [PATCH 4/5] docs(SDK-873): move SPM changelog entry to Unreleased --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f38ecb658..2953fcf27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.0.0 +## Unreleased ### Breaking changes @@ -10,6 +10,10 @@ - A Notification Service Extension that uses `pod 'Iterable-iOS-AppExtensions'` keeps working, but stays on 6.7.5 forever. To have it follow the iOS SDK version this SDK pins in future releases, remove the pod and add the `IterableAppExtensions` product of `https://github.com/Iterable/iterable-swift-sdk` to the extension target in Xcode, with a dependency rule that allows that version (for example, **Up to Next Major Version** from `6.0.0`). Xcode resolves one version of the package for the whole workspace. - Expo: update `@iterable/expo-plugin` to the release whose peer range includes `^4.0.0`. Earlier plugin versions fail to build `ExpoAdapterIterable` with `no such module 'IterableSDK'`. +## 4.0.0 + +### Breaking changes + - Inbox HTML messages no longer forward unknown `iterable://` links to `urlHandler`. `iterable://` is reserved for `iterable://delete` and `iterable://dismiss`. Any other `iterable://` link closes the message and calls no handler. Use `action://name` for custom actions (`customActionHandler`) and your app's own scheme for deep links (`urlHandler`). In inbox messages, `http(s)` links open with `Linking.openURL` and do not call `urlHandler`. ### Fixes From 154177c0e87cee7577f8f1cd64023c150e339818 Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 2 Dec 2026 22:28:18 +0000 Subject: [PATCH 5/5] docs(SDK-873): target 4.1.0 for the SPM cutover --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2953fcf27..8d078f1f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,13 @@ ### Breaking changes -- iOS: the SDK now installs Iterable's iOS SDK through Swift Package Manager instead of the `Iterable-iOS-SDK` pod, because CocoaPods trunk is read-only and 6.7.5 is the last version published there (SDK-873). The podspec uses React Native's `spm_dependency` helper (React Native 0.75+, within this SDK's 0.77+ requirement) and still pins iOS SDK 6.7.5 exactly, so `pod install` keeps working as before and Xcode resolves `https://github.com/Iterable/iterable-swift-sdk.git` from GitHub. +- iOS: starting with 4.1.0, the SDK installs Iterable's iOS SDK through Swift Package Manager instead of the `Iterable-iOS-SDK` pod (a breaking change shipped in a minor release by product decision), because CocoaPods trunk is read-only and 6.7.5 is the last version published there (SDK-873). The podspec uses React Native's `spm_dependency` helper (React Native 0.75+, within this SDK's 0.77+ requirement) and still pins iOS SDK 6.7.5 exactly, so `pod install` keeps working as before and Xcode resolves `https://github.com/Iterable/iterable-swift-sdk.git` from GitHub. - iOS builds now require Xcode 26 or later. Xcode 16 adds the Swift package's object to the static `Iterable-React-Native-SDK` pod twice, so the app link fails with duplicate `IterableSDK` symbols. - Remove any `pod 'Iterable-iOS-SDK'` lines from your app targets in your `Podfile`. Keeping them fails the build with `Redefinition of module 'IterableSDK'`. - `use_frameworks! :linkage => :dynamic` is no longer required. Static libraries, static frameworks, and dynamic frameworks all work, and both the New and Legacy Architecture work. - `#import ` no longer resolves in Objective-C++ (`.mm`) files. Call the SDK from Swift or from an Objective-C (`.m`) file with `@import IterableSDK;`. - A Notification Service Extension that uses `pod 'Iterable-iOS-AppExtensions'` keeps working, but stays on 6.7.5 forever. To have it follow the iOS SDK version this SDK pins in future releases, remove the pod and add the `IterableAppExtensions` product of `https://github.com/Iterable/iterable-swift-sdk` to the extension target in Xcode, with a dependency rule that allows that version (for example, **Up to Next Major Version** from `6.0.0`). Xcode resolves one version of the package for the whole workspace. - - Expo: update `@iterable/expo-plugin` to the release whose peer range includes `^4.0.0`. Earlier plugin versions fail to build `ExpoAdapterIterable` with `no such module 'IterableSDK'`. + - Expo: update `@iterable/expo-plugin` to the release that supports 4.1.0 (the first version after 1.1.x). Plugin 1.1.x and earlier fail to build `ExpoAdapterIterable` with `no such module 'IterableSDK'`. ## 4.0.0