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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ example/ios/Pods
Gemfile.lock
Podfile.lock

# Swift Package Manager
#
Package.resolved

# Ruby
example/vendor/

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## Unreleased

### Breaking changes

- 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 <IterableSDK/IterableSDK-Swift.h>` 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 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

### Breaking changes
Expand Down
9 changes: 7 additions & 2 deletions Iterable-React-Native-SDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ 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)
- **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 <IterableSDK/IterableSDK-Swift.h>` 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
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
2 changes: 0 additions & 2 deletions ios/RNIterableAPI/RNIterableAPI.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#import <string>
#endif

#import <IterableSDK/IterableSDK.h>

// Forward-declare the Swift protocols/enum used in the Swift header
// to avoid compiler errors.
@protocol IterableInAppDelegate;
Expand Down
Loading