Skip to content

Commit a8faf4a

Browse files
committed
Merge branch 'master' into feature/SDK-548-feature-parity
2 parents 31d59d2 + 4777001 commit a8faf4a

11 files changed

Lines changed: 318 additions & 202 deletions

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,29 @@ jobs:
175175
- name: Setup
176176
uses: ./.github/actions/setup
177177

178-
# Initializes the CodeQL tools for scanning.
178+
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
179+
with:
180+
xcode-version: '16.4'
181+
182+
- name: Print available simulators
183+
run: xcrun simctl list devices | cat
184+
185+
- name: Get latest stable iOS version
186+
id: ios-version
187+
run: |
188+
# First try to find iOS 18.x that's available
189+
LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS 18" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
190+
191+
# If no iOS 18.x available, fall back to any available iOS version
192+
if [ -z "$LATEST_IOS" ]; then
193+
echo "No iOS 18.x available, falling back to latest available iOS version..."
194+
LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
195+
fi
196+
197+
echo "version=$LATEST_IOS" >> $GITHUB_OUTPUT
198+
echo "Latest stable iOS version: $LATEST_IOS"
199+
200+
# Initializes the CodeQL tools for scanning.
179201
- name: Initialize CodeQL
180202
uses: github/codeql-action/init@v4
181203
with:
@@ -188,15 +210,16 @@ jobs:
188210
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
189211
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
190212

191-
- if: matrix.build-mode == 'manual'
213+
- name: Build example for CodeQL
214+
if: matrix.build-mode == 'manual'
192215
shell: bash
193216
run: |
194217
cd example
195218
yarn install
196219
cd ios
197220
bundle install
198221
bundle exec pod install
199-
xcodebuild -workspace ReactNativeSdkExample.xcworkspace -scheme ReactNativeSdkExample -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16' build
222+
xcodebuild -workspace ReactNativeSdkExample.xcworkspace -scheme ReactNativeSdkExample -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=${{ steps.ios-version.outputs.version }}' build
200223
201224
- name: Perform CodeQL Analysis
202225
uses: github/codeql-action/analyze@v4

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
- iOS: forwards to native `IterableAPI.disableDeviceForAllUsers()`.
77
- Android: graceful no-op that logs a warning; use `disableDeviceForCurrentUser()` to disable push for the current user. There is no public native "all users" equivalent.
88

9+
## 3.2.0
10+
11+
### Updates
12+
13+
- Bumped native SDK pins to Android [3.10.1](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.10.1) and iOS [6.7.5](https://github.com/Iterable/swift-sdk/releases/tag/6.7.5). This is a native SDK bump, not new JS APIs.
14+
- Android now pulls `androidx.work:work-runtime:2.9.0` as a transitive dependency (WorkManager replaced AsyncTask-based push handling in native 3.7.0). No app code change is required.
15+
- On iOS, `enableUnknownUserActivation` now defaults to `false` (fixed in native 6.7.1). RN 3.1.0 pinned iOS 6.6.7, where this flag defaulted to `true`, so iOS apps were accidentally running unknown-user activation. This release does not expose that config; unknown-user activation stays off on iOS unless a later RN release adds the API. Android's default was already `false`.
16+
917
## 3.1.0
1018

1119
### Fixes

‎Iterable-React-Native-SDK.podspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717
s.private_header_files = "ios/**/*.h"
1818

1919
# Load Iterables iOS SDK as a dependency
20-
s.dependency "Iterable-iOS-SDK", "6.6.7"
20+
s.dependency "Iterable-iOS-SDK", "6.7.5"
2121

2222
# Basic Swift support
2323
s.pod_target_xcconfig = {

‎README.md‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Iterable. It supports JavaScript and TypeScript.
2424
- [Beta Versions](#beta-versions)
2525
- [Features](#features)
2626
- [Example project](#example-project)
27+
- [Building a local npm package](#building-a-local-npm-package)
2728
- [Version mapping](#version-mapping)
2829
- [Release notes, support and troubleshooting](#release-notes-support-and-troubleshooting)
2930
- [License](#license)
@@ -38,8 +39,8 @@ Iterable. It supports JavaScript and TypeScript.
3839
Iterable's React Native SDK relies on:
3940

4041
- **React Native**
41-
- [React Native 0.75+](https://github.com/facebook/react-native)
42-
- [React 18.1+](https://github.com/facebook/react)
42+
- [React Native 0.77+](https://github.com/facebook/react-native)
43+
- [React 18.3.1+](https://github.com/facebook/react)
4344

4445
_UI Components require additional peer dependencies_
4546
- [React Navigation 6+](https://github.com/react-navigation/react-navigation)
@@ -54,6 +55,7 @@ Iterable's React Native SDK relies on:
5455
```ruby
5556
use_frameworks! :linkage => :dynamic
5657
```
58+
- **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.
5759
5860
- **Android**
5961
- [`minSdkVersion` 21+, `compileSdkVersion` 31+](https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd)
@@ -118,12 +120,28 @@ For sample code, take a look at the following project:
118120

119121
- [Example App](https://github.com/Iterable/react-native-sdk/tree/master/example)
120122

123+
## Building a local npm package
124+
125+
Generate a `.tgz` from **this** React Native SDK checkout. Do not run `npm pack` from a consuming app; that will not produce `@iterable/react-native-sdk`.
126+
127+
From the root of this repository:
128+
129+
```bash
130+
yarn install
131+
npm pack
132+
```
133+
134+
`yarn install` runs `prepare` / `yarn build`. `npm pack` writes
135+
`iterable-react-native-sdk-<version>.tgz` in the repo root, using the version
136+
in `package.json` (for example `iterable-react-native-sdk-3.2.0.tgz`).
137+
121138
## Version mapping
122139

123140
For quick reference, the following table lists the versions of the [Android SDK](https://github.com/Iterable/iterable-android-sdk) and the [iOS SDK](https://github.com/Iterable/swift-sdk) the React Native SDK points to for version 1.2.0 and above.
124141

125142
| RN SDK Version | Android SDK Version | iOS SDK Version |
126143
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------- |
144+
| [3.2.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.2.0) | [3.10.1](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.10.1) | [6.7.5](https://github.com/Iterable/swift-sdk/releases/tag/6.7.5)
127145
| [3.1.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.1.0) | [3.6.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.6.2) | [6.6.7](https://github.com/Iterable/swift-sdk/releases/tag/6.6.7)
128146
| [3.0.1](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.0.1) | [3.6.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.6.2) | [6.6.3](https://github.com/Iterable/swift-sdk/releases/tag/6.6.3)
129147
| [3.0.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/3.0.0) | [3.6.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.6.2) | [6.6.3](https://github.com/Iterable/swift-sdk/releases/tag/6.6.3)

‎android/build.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
105105
dependencies {
106106
implementation "com.facebook.react:react-android"
107107
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
108-
api "com.iterable:iterableapi:3.6.2"
108+
api "com.iterable:iterableapi:3.10.1"
109109
// api project(":iterableapi") // links to local android SDK repo rather than by release
110110
}
111111

‎example/README.md‎

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,15 @@ React Native application.
1111
>"Creating a new application" step, before proceeding.
1212
1313
## Step 1: Install dependencies
14-
To install the app dependencies, run the following command from the
15-
_example app directory_ (the directory in which this document resides):
1614

17-
```bash
18-
yarn install
19-
```
20-
21-
Once this is done, you will need to install the pods in the _ios_ folder in the
22-
_example app directory_. To do so, run the following:
15+
From the **SDK repo root** (the parent of this `example/` directory):
2316

2417
```bash
25-
cd ios
26-
bundle install
27-
bundle exec pod install
18+
yarn install
19+
(cd example/ios && bundle install && bundle exec pod install)
2820
```
2921

30-
Once this is done, `cd` back into the _example app directory_:
31-
32-
```bash
33-
cd ..
34-
```
22+
`yarn install` at the root installs the Yarn workspace (SDK + example). The `example/ios` step is **iOS only** — skip it if you are only running Android.
3523

3624
## Step 2: Add your environment variables
3725
In the _example app directory_, there is a file called **.env.example**. Make a
@@ -69,36 +57,26 @@ To add an API key, do the following:
6957
6. Copy the generated API key and JWT secret into your _.env_ file
7058

7159

72-
## Step 3: Start the Metro Server
60+
## Step 3: Start your Application
7361

74-
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
75-
76-
To start Metro, run the following command from the _example app directory_:
62+
From the **SDK repo root**, run one of:
7763

7864
```bash
79-
yarn start
65+
yarn example android
8066
```
8167

82-
## Step 4: Start your Application
83-
84-
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _example app directory_. Run the following command to start your _Android_ or _iOS_ app:
85-
86-
### For Android
87-
8868
```bash
89-
yarn android
69+
yarn example ios
9070
```
9171

92-
### For iOS
72+
`run-android` / `run-ios` start **Metro** in a separate terminal by default. You do not need to run `yarn start` first. Pass `--no-packager` if you already have Metro running and do not want a second window.
9373

94-
```bash
95-
yarn ios
96-
```
74+
On **Xcode 27**, the CLI opens **Device Hub** (`DeviceHub.app`) instead of Simulator. This example pins `@react-native-community/cli` **20.2.0+** for that path. If several Xcode versions are installed, `xcode-select -p` must point at the one you intend to use.
9775

9876
**NOTE**: If you are getting an error when running ios, make sure that *Xcode > Project Navigator > ReactNativeSdkExample > Build Settings > User
9977
Script Sandboxing* is set to **No**
10078

101-
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
79+
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or on iOS (Simulator on Xcode 26 and earlier, Device Hub on Xcode 27) shortly provided you have set up your emulator/simulator correctly.
10280

10381
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
10482

@@ -218,6 +196,12 @@ gem install xcodeproj -v '< 1.26.0'
218196
gem install concurrent-ruby -v '< 1.3.4'
219197
```
220198

199+
## Xcode 27
200+
201+
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.
202+
203+
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.
204+
221205
## Xcode 16.3 Issue
222206

223207
There is a [known issue](https://github.com/facebook/react-native/issues/50411)

‎example/ios/Podfile‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,22 @@ target 'ReactNativeSdkExample' do
3434
)
3535

3636

37-
## Temporary workaround for Xcode 26.4
37+
# Temporary workaround for Xcode 26.x / 27.
38+
# fmt 11.0.2 fails consteval checks under Apple Clang 21; compile fmt as C++17 only.
39+
# All other pods stay in C++20 (React-perflogger needs std::unordered_map::contains).
40+
# Xcode 27 rejects Pods resource-bundle targets below iOS 15.0 (e.g.
41+
# Iterable-iOS-SDK-IterableSDKResources at 12.0). Lift those generated targets
42+
# to RN's min; do not change published podspec support ranges.
3843
installer.pods_project.targets.each do |target|
3944
target.build_configurations.each do |config|
40-
# fmt/base.h unconditionally redefines FMT_USE_CONSTEVAL based on __cplusplus,
41-
# so preprocessor defines are overwritten. The reliable fix is to compile fmt
42-
# in C++17 mode: FMT_CPLUSPLUS (201703L) < 201709L → FMT_USE_CONSTEVAL = 0.
43-
# All other pods stay in C++20 (React-perflogger needs std::unordered_map::contains).
4445
if target.name == 'fmt'
4546
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
4647
end
4748

49+
current = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
50+
if current.nil? || current.to_f < 15.1
51+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
52+
end
4853
end
4954
end
5055
end

‎example/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"@babel/core": "^7.25.2",
2626
"@babel/preset-env": "^7.25.3",
2727
"@babel/runtime": "^7.25.0",
28-
"@react-native-community/cli": "20.1.0",
29-
"@react-native-community/cli-platform-android": "20.1.0",
30-
"@react-native-community/cli-platform-ios": "20.1.0",
28+
"@react-native-community/cli": "20.2.0",
29+
"@react-native-community/cli-platform-android": "20.2.0",
30+
"@react-native-community/cli-platform-ios": "20.2.0",
3131
"@react-native/babel-preset": "0.85.3",
3232
"@react-native/eslint-config": "0.85.3",
3333
"@react-native/jest-preset": "0.85.3",

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iterable/react-native-sdk",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Iterable SDK for React Native.",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",
@@ -71,7 +71,7 @@
7171
"devDependencies": {
7272
"@commitlint/config-conventional": "^19.6.0",
7373
"@evilmartians/lefthook": "^1.5.0",
74-
"@react-native-community/cli": "20.1.0",
74+
"@react-native-community/cli": "20.2.0",
7575
"@react-native/babel-preset": "0.85.3",
7676
"@react-native/eslint-config": "0.85.3",
7777
"@react-native/jest-preset": "0.85.3",

‎src/itblBuildInfo.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* It contains the version of the package
44
*/
55
export const buildInfo = {
6-
version: '3.1.0',
6+
version: '3.2.0',
77
};

0 commit comments

Comments
 (0)