Skip to content

Commit 786a079

Browse files
committed
Merge branch 'jwt/master' into jwt/MOB-10946-task-2-authfailure-and-retrypolicy-ts-classes
2 parents a63b9dc + 492c3b6 commit 786a079

14 files changed

Lines changed: 1380 additions & 467 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
20+
jobs:
21+
Analyze_Ruby_JSandTS:
22+
name: Analyze (${{ matrix.language }})
23+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
24+
permissions:
25+
# required for all workflows
26+
security-events: write
27+
28+
# required to fetch internal or private CodeQL packs
29+
packages: read
30+
31+
# only required for workflows in private repositories
32+
actions: read
33+
contents: read
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- language: actions
40+
build-mode: none
41+
- language: javascript-typescript
42+
build-mode: none
43+
- language: ruby
44+
build-mode: none
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
49+
# Add any setup steps before running the `github/codeql-action/init` action.
50+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
51+
# or others). This is typically only required for manual builds.
52+
# - name: Setup runtime (example)
53+
# uses: actions/setup-example@v1
54+
55+
# Initializes the CodeQL tools for scanning.
56+
- name: Initialize CodeQL
57+
uses: github/codeql-action/init@v3
58+
with:
59+
languages: ${{ matrix.language }}
60+
build-mode: ${{ matrix.build-mode }}
61+
# If you wish to specify custom queries, you can do so here or in a config file.
62+
# By default, queries listed here will override any specified in a config file.
63+
# Prefix the list here with "+" to use these queries and those in the config file.
64+
65+
# 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
66+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
67+
68+
- if: matrix.build-mode == 'manual'
69+
shell: bash
70+
run: |
71+
echo 'If you are using a "manual" build mode for one or more of the' \
72+
'languages you are analyzing, replace this with the commands to build' \
73+
'your code, for example:'
74+
echo ' make bootstrap'
75+
echo ' make release'
76+
exit 1
77+
- name: Perform CodeQL Analysis
78+
uses: github/codeql-action/analyze@v3
79+
with:
80+
category: "/language:${{matrix.language}}"
81+
82+
Build_Analyze_Android_Example:
83+
name: Analyze (${{ matrix.language }})
84+
runs-on: ubuntu-latest
85+
env:
86+
TURBO_CACHE_DIR: .turbo/android
87+
permissions:
88+
# required for all workflows
89+
security-events: write
90+
91+
# required to fetch internal or private CodeQL packs
92+
packages: read
93+
94+
# only required for workflows in private repositories
95+
actions: read
96+
contents: read
97+
98+
strategy:
99+
fail-fast: false
100+
matrix:
101+
include:
102+
- language: java-kotlin
103+
build-mode: manual
104+
105+
steps:
106+
- name: Checkout repository
107+
uses: actions/checkout@v4
108+
109+
# Add any setup steps before running the `github/codeql-action/init` action.
110+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
111+
# or others). This is typically only required for manual builds.
112+
# - name: Setup runtime (example)
113+
# uses: actions/setup-example@v1
114+
115+
- name: Setup
116+
uses: ./.github/actions/setup
117+
118+
- name: Install JDK
119+
if: env.turbo_cache_hit != 1
120+
uses: actions/setup-java@v3
121+
with:
122+
distribution: 'zulu'
123+
java-version: '17'
124+
125+
- name: Finalize Android SDK
126+
if: env.turbo_cache_hit !=1
127+
run: |
128+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
129+
130+
# Initializes the CodeQL tools for scanning.
131+
- name: Initialize CodeQL
132+
uses: github/codeql-action/init@v3
133+
with:
134+
languages: ${{ matrix.language }}
135+
build-mode: ${{ matrix.build-mode }}
136+
# If you wish to specify custom queries, you can do so here or in a config file.
137+
# By default, queries listed here will override any specified in a config file.
138+
# Prefix the list here with "+" to use these queries and those in the config file.
139+
140+
# 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
141+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
142+
143+
- if: matrix.build-mode == 'manual'
144+
shell: bash
145+
run: |
146+
cd example
147+
yarn install
148+
cd android
149+
./gradlew clean
150+
151+
- name: Perform CodeQL Analysis
152+
uses: github/codeql-action/analyze@v3
153+
with:
154+
category: "/language:${{matrix.language}}"
155+
156+
Build_Analyze_iOS_Example:
157+
name: Analyze (${{ matrix.language }})
158+
timeout-minutes: 120
159+
env:
160+
TURBO_CACHE_DIR: .turbo/ios
161+
TURBO_TOKEN: ${{ secrets. TURBO_TOKEN }}
162+
TURBO_TEAM: ${{ secrets. TURBO_TEAM }}
163+
164+
runs-on: ${{ (matrix.language == 'swift' && 'macos-15') || 'ubuntu-latest' }}
165+
permissions:
166+
# required for all workflows
167+
security-events: write
168+
# required to fetch internal or private CodeQL packs
169+
packages: read
170+
# only required for workflows in private repositories
171+
actions: read
172+
contents: read
173+
174+
strategy:
175+
fail-fast: false
176+
matrix:
177+
include:
178+
- language: swift
179+
build-mode: manual
180+
181+
steps:
182+
- name: Checkout react-native-sdk
183+
uses: actions/checkout@v4
184+
185+
- name: Setup
186+
uses: ./.github/actions/setup
187+
188+
# Initializes the CodeQL tools for scanning.
189+
- name: Initialize CodeQL
190+
uses: github/codeql-action/init@v3
191+
with:
192+
languages: ${{ matrix.language }}
193+
build-mode: ${{ matrix.build-mode }}
194+
# If you wish to specify custom queries, you can do so here or in a config file.
195+
# By default, queries listed here will override any specified in a config file.
196+
# Prefix the list here with "+" to use these queries and those in the config file.
197+
198+
# 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
199+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
200+
201+
- if: matrix.build-mode == 'manual'
202+
shell: bash
203+
run: |
204+
cd example
205+
yarn install
206+
cd ios
207+
bundle install
208+
bundle exec pod install
209+
xcodebuild -workspace ReactNativeSdkExample.xcworkspace -scheme ReactNativeSdkExample -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16' build
210+
211+
- name: Perform CodeQL Analysis
212+
uses: github/codeql-action/analyze@v3
213+
with:
214+
category: "/language:${{matrix.language}}"

CHANGELOG.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
## 2.1.0-alpha.0 (2025-09-27)
2-
* fix: update clickedUrl parameter type to allow null values in trackInAppClose method per PR comment ([26fa44b](https://github.com/Iterable/react-native-sdk/commit/26fa44b))
3-
* refactor: add wakeApp placeholder method ([4cc665f](https://github.com/Iterable/react-native-sdk/commit/4cc665f))
4-
* refactor: remove redundant error handling in RNIterableAPI to streamline message retrieval ([5a946b2](https://github.com/Iterable/react-native-sdk/commit/5a946b2))
5-
* refactor: simplify attribution info handling and improve error reporting in RNIterableAPI ([e0d026e](https://github.com/Iterable/react-native-sdk/commit/e0d026e))
6-
* refactor: update initialize2WithApiKey so that parameters are always in the same order ([18bd0af](https://github.com/Iterable/react-native-sdk/commit/18bd0af))
7-
* refactor: update ios interfaces to enforce non-nullable parameters for better safety ([32c7eb8](https://github.com/Iterable/react-native-sdk/commit/32c7eb8))
8-
* refactor: update parameter types in RNIterableAPI to reflect automatically created jsi file ([b6e4488](https://github.com/Iterable/react-native-sdk/commit/b6e4488))
9-
* refactor: update parameter types in RNIterableAPI to use Double to match codegen ([5d8c543](https://github.com/Iterable/react-native-sdk/commit/5d8c543))
10-
* refactor: update parameter types to nullable in RNIterableAPI for consistency ([560a8c5](https://github.com/Iterable/react-native-sdk/commit/560a8c5))
11-
* refactor: update templateId parameter type to Double in RNIterableAPI for consistency ([dfb4934](https://github.com/Iterable/react-native-sdk/commit/dfb4934))
12-
* refactor: update templateId parameter type to nullable in trackPushOpenWithCampaignId ([f9aa273](https://github.com/Iterable/react-native-sdk/commit/f9aa273))
13-
* refactor: update templateId type to double in trackPushOpenWithCampaignId ([c009a1e](https://github.com/Iterable/react-native-sdk/commit/c009a1e))
14-
* chore: downgrade version from 2.0.3-alpha.1 to 2.0.2 ([61ec865](https://github.com/Iterable/react-native-sdk/commit/61ec865))
15-
* chore: update dependencies for React Navigation and related packages ([95053bb](https://github.com/Iterable/react-native-sdk/commit/95053bb))
16-
* Update ios/RNIterableAPI/ReactIterableAPI.swift ([3e252ee](https://github.com/Iterable/react-native-sdk/commit/3e252ee))
1+
## 2.1.0-beta.0
2+
3+
### Updates
4+
- Update SDK so that it has full support for [React Native New Architecture](https://reactnative.dev/architecture/landing-page)
5+
6+
### Chores
7+
- Update dependencies for React Navigation and related packages ([95053bb](https://github.com/Iterable/react-native-sdk/commit/95053bb))
8+
9+
10+
## 2.0.3
11+
12+
### Updates
13+
- Add in-app message manager with lazy initialization to avoid circular dependency ([6feec35](https://github.com/Iterable/react-native-sdk/commit/6feec35))
14+
15+
### Fixes
16+
- Update Iterable-iOS-SDK to 6.5.4.1 to fix issue #701 (performAndWait) ([0bb4a24](https://github.com/Iterable/react-native-sdk/commit/0bb4a24)), closes [#701](https://github.com/Iterable/react-native-sdk/issues/701)
17+
- Update Xcode project configuration to include CocoaPods build phases and settings ([23a9e79](https://github.com/Iterable/react-native-sdk/commit/23a9e79))
18+
- Enable CodeQl Advanced Config ([7346e56](https://github.com/Iterable/react-native-sdk/commit/7346e56))
19+
- Upload coverage report to Qlty ([6872621](https://github.com/Iterable/react-native-sdk/commit/6872621))
20+
- Simplify IterableInAppManager usage in tests by directly accessing Iterable.inAppManager ([6deeae3](https://github.com/Iterable/react-native-sdk/commit/6deeae3))
21+
- Correct markdown link syntax in IterableInAppManager documentation ([78e22b2](https://github.com/Iterable/react-native-sdk/commit/78e22b2))
22+
1723

1824
## 2.0.2
1925
### Fixes

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Iterable. It supports JavaScript and TypeScript.
1919
- [Requirements](#requirements)
2020
- [Architecture Support](#architecture-support)
2121
- [Installation](#installation)
22+
- [Beta Versions](#beta-versions)
2223
- [Features](#features)
2324
- [Sample projects](#sample-projects)
2425
- [Version mapping](#version-mapping)
@@ -70,6 +71,23 @@ Notes:
7071
7172
For installation instructions, read [Installing Iterable's React Native SDK](https://support.iterable.com/hc/articles/360045714132).
7273

74+
## Beta Versions
75+
76+
To opt into beta versions of the SDK, you can install the latest beta version by using the `beta` tag:
77+
78+
```bash
79+
# Install the latest beta version
80+
npm install @iterable/react-native-sdk@beta
81+
82+
# Or using yarn
83+
yarn add @iterable/react-native-sdk@beta
84+
```
85+
86+
**Note:** Beta versions may contain experimental features and could have
87+
breaking changes. We recommend testing beta versions in development environments
88+
before using them in production. Please report any issues found in beta
89+
releases to [Customer Support](https://support.iterable.com/hc/en-us/requests/new).
90+
7391
## Features
7492

7593
To learn more about the SDK, read:
@@ -96,6 +114,9 @@ For quick reference, the following table lists the versions of the [Android SDK]
96114
97115
| RN SDK Version | Android SDK Version | iOS SDK Version |
98116
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------- |
117+
| [2.1.0-beta.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.1.0-beta.0) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)
118+
| [2.0.3](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.0.3) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)
119+
| [2.0.2](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.0.2) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)
99120
| [2.0.1](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.0.1) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)
100121
| [2.0.0](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.0.0) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)
101122
| [2.0.0-beta.1](https://www.npmjs.com/package/@iterable/react-native-sdk/v/2.0.0-beta.1) | [3.5.2](https://github.com/Iterable/iterable-android-sdk/releases/tag/3.5.2) | [6.5.4](https://github.com/Iterable/swift-sdk/releases/tag/6.5.4)

example/ios/Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ target 'ReactNativeSdkExample' do
2626
:app_path => "#{Pod::Config.instance.installation_root}/.."
2727
)
2828

29-
pod 'Iterable-iOS-SDK', :git => 'https://github.com/Iterable/iterable-swift-sdk.git', :branch => 'hotfix/MOB-12091-temp-fix'
30-
3129
post_install do |installer|
3230
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
3331
react_native_post_install(

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
setupFilesAfterEnv: [
55
'<rootDir>/node_modules/@testing-library/jest-native/extend-expect',
66
],
7-
testMatch: ['<rootDir>/src/__tests__/**/*.(test|spec).[jt]s?(x)'],
7+
testMatch: ['<rootDir>/src/**/*.(test|spec).[jt]s?(x)'],
88
transformIgnorePatterns: [
99
'node_modules/(?!(react-native|@react-native|@react-navigation|react-native-screens|react-native-safe-area-context|react-native-gesture-handler|react-native-webview|react-native-vector-icons)/)',
1010
],

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iterable/react-native-sdk",
3-
"version": "2.1.0-alpha.0",
3+
"version": "2.1.0-beta.0",
44
"description": "Iterable SDK for React Native.",
55
"source": "./src/index.tsx",
66
"main": "./lib/module/index.js",
@@ -36,6 +36,7 @@
3636
"add_build_info": "node scripts/autoCreatePackageInfo.js",
3737
"example": "yarn workspace @iterable/react-native-sdk-example",
3838
"test": "jest",
39+
"test:watch": "jest --watch",
3940
"test:coverage": "jest --coverage",
4041
"typecheck": "tsc",
4142
"lint": "eslint \"**/*.{js,ts,tsx}\"",
@@ -75,7 +76,7 @@
7576
"@react-navigation/native": "^7.1.14",
7677
"@release-it/conventional-changelog": "^9.0.4",
7778
"@testing-library/jest-native": "^5.4.3",
78-
"@testing-library/react-native": "^12.7.2",
79+
"@testing-library/react-native": "^13.3.3",
7980
"@types/jest": "^29.5.5",
8081
"@types/react": "^19.0.0",
8182
"@types/react-native-vector-icons": "^6.4.18",
@@ -102,7 +103,7 @@
102103
"react-test-renderer": "19.0.0",
103104
"release-it": "^17.10.0",
104105
"turbo": "^1.10.7",
105-
"typedoc": "^0.26.11",
106+
"typedoc": "^0.28.13",
106107
"typedoc-plugin-coverage": "^3.3.0",
107108
"typedoc-plugin-mermaid": "^1.12.0",
108109
"typescript": "^5.2.2"
@@ -136,7 +137,10 @@
136137
"release-it": {
137138
"git": {
138139
"commitMessage": "chore: release ${version}",
139-
"tagName": "${version}"
140+
"tagName": "${version}",
141+
"tag": true,
142+
"commit": true,
143+
"push": true
140144
},
141145
"npm": {
142146
"publish": true

src/__mocks__/MockRNIterableAPI.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,16 @@ export class MockRNIterableAPI {
6666
MockRNIterableAPI.attributionInfo = attributionInfo;
6767
}
6868

69-
static initializeWithApiKey = jest.fn();
69+
static initializeWithApiKey = jest.fn().mockResolvedValue(true);
70+
71+
static initialize2WithApiKey = jest.fn().mockResolvedValue(true);
72+
73+
static wakeApp = jest.fn()
7074

7175
static setInAppShowResponse = jest.fn();
7276

77+
static passAlongAuthToken = jest.fn();
78+
7379
static async getInAppMessages(): Promise<IterableInAppMessage[] | undefined> {
7480
return await new Promise((resolve) => {
7581
resolve(MockRNIterableAPI.messages);

0 commit comments

Comments
 (0)