From 2ffcc1bc99adeed30f33dd32396535c473f937ac Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Mar 2026 09:32:27 -0700 Subject: [PATCH 1/5] fix: force OkHttp 4.x to resolve React Native incompatibility --- android/build.gradle | 12 +++++++++--- examples/demo/android/app/build.gradle | 6 ------ examples/demo/bun.lock | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 349d8960..fb12657c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -32,7 +32,13 @@ dependencies { // api is used instead of implementation so the parent :app project can access any of the OneSignal Java // classes if needed. Such as com.onesignal.NotificationExtenderService - api 'com.onesignal:OneSignal:5.7.2' - + // + // Exclude OkHttp from OneSignal's transitive deps: the 5.7.x otel module pulls in OkHttp 5.x + // (via opentelemetry-exporter-sender-okhttp) which is binary-incompatible with React Native's + // networking stack (okhttp3.internal.Util removed in 5.x). React Native already provides OkHttp 4.x. + api('com.onesignal:OneSignal:5.7.2') { + exclude group: 'com.squareup.okhttp3', module: 'okhttp' + } + testImplementation 'junit:junit:4.12' -} \ No newline at end of file +} diff --git a/examples/demo/android/app/build.gradle b/examples/demo/android/app/build.gradle index 5d655637..4194e4a7 100644 --- a/examples/demo/android/app/build.gradle +++ b/examples/demo/android/app/build.gradle @@ -109,12 +109,6 @@ android { apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" -configurations.all { - resolutionStrategy { - force 'com.squareup.okhttp3:okhttp:4.12.0' - } -} - dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") diff --git a/examples/demo/bun.lock b/examples/demo/bun.lock index 9f6135e3..65d6c9d9 100644 --- a/examples/demo/bun.lock +++ b/examples/demo/bun.lock @@ -1368,7 +1368,7 @@ "react-native": ["react-native@0.84.0", "", { "dependencies": { "@jest/create-cache-key-function": "^29.7.0", "@react-native/assets-registry": "0.84.0", "@react-native/codegen": "0.84.0", "@react-native/community-cli-plugin": "0.84.0", "@react-native/gradle-plugin": "0.84.0", "@react-native/js-polyfills": "0.84.0", "@react-native/normalize-colors": "0.84.0", "@react-native/virtualized-lists": "0.84.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "0.32.0", "base64-js": "^1.5.1", "commander": "^12.0.0", "flow-enums-runtime": "^0.0.6", "hermes-compiler": "250829098.0.7", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.83.3", "metro-source-map": "^0.83.3", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^6.1.5", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.27.0", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "tinyglobby": "^0.2.15", "whatwg-fetch": "^3.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^19.1.1", "react": "^19.2.3" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-CcBfucLDHz8MAjQx9kFXasYtpcn8zP1YapUgGtAy0psRZTLShwF9yeh5+ErSgEK2gXV1CCSz7hqCZqx1eMyBLA=="], - "react-native-onesignal": ["react-native-onesignal@../../react-native-onesignal.tgz", { "dependencies": { "invariant": "^2.2.4" } }, "sha512-0nTugjtXXMwK59Ff5KAYsiYb5wvMAM7YQiDEEga2JNZ4fHlst3VY4YAEsepA7RuddO2sZxzthOZ+NkGaiTVC/w=="], + "react-native-onesignal": ["react-native-onesignal@../../react-native-onesignal.tgz", { "dependencies": { "invariant": "^2.2.4" } }, "sha512-uxXaJYopKixrHXVvFjWH+ek5wbGydTxbrZ6e36BzCAKM2fHSyIiefcUY0niT+MWg8fDlHEwpocmY4KvM9AmvYA=="], "react-native-safe-area-context": ["react-native-safe-area-context@5.6.2", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-4XGqMNj5qjUTYywJqpdWZ9IG8jgkS3h06sfVjfw5yZQZfWnRFXczi0GnYyFyCc2EBps/qFmoCH8fez//WumdVg=="], From 492ec3e75b7f0442e6783defd9eddde4f66b3710 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Mar 2026 11:40:18 -0700 Subject: [PATCH 2/5] ci: fix Android version parsing in release workflow --- .github/workflows/create-release-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index cddd491a..4dd19dbb 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -94,7 +94,7 @@ jobs: # Get versions from target branch (not the release branch) CURRENT_VERSION=$(git show origin/${{ inputs.target_branch }}:package.json | jq -r .version) - ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | grep "api 'com.onesignal:OneSignal:" | sed -E "s/.*OneSignal:([0-9.]+).*/\1/") + ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | grep "com.onesignal:OneSignal:" | sed -E "s/.*OneSignal:([0-9.]+).*/\1/") IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:react-native-onesignal.podspec | grep "OneSignalXCFramework" | sed -E "s/.*'([0-9.]+)'.*/\1/") echo "rn_from=$CURRENT_VERSION" >> $GITHUB_OUTPUT @@ -116,8 +116,8 @@ jobs: exit 1 fi - # Update Android SDK version in build.gradle - sed -i '' "s/api 'com.onesignal:OneSignal:[^']*'/api 'com.onesignal:OneSignal:$VERSION'/" android/build.gradle + # Update Android SDK version in build.gradle (handles both api '...' and api('...') syntax) + sed -i '' -E "s/(com\.onesignal:OneSignal:)[0-9.]+/\1$VERSION/" android/build.gradle echo "✓ Updated android/build.gradle with Android SDK ${VERSION}" # Only commit if there are changes From df7dcb39d67832f3300ba8eb9479655c2e6ac5f2 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Mar 2026 11:41:29 -0700 Subject: [PATCH 3/5] ci: add Linear ticket deployment workflow --- .github/workflows/linear-deployed.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/linear-deployed.yml diff --git a/.github/workflows/linear-deployed.yml b/.github/workflows/linear-deployed.yml new file mode 100644 index 00000000..b5af2c97 --- /dev/null +++ b/.github/workflows/linear-deployed.yml @@ -0,0 +1,13 @@ +name: Move Linear tickets to Deployed + +on: + release: + types: [published, edited] + +jobs: + linear-deployed: + uses: OneSignal/sdk-shared/.github/workflows/linear-deployed.yml@main + with: + release_body: ${{ github.event.release.body }} + secrets: + LINEAR_GITHUB_API_KEY: ${{ secrets.LINEAR_GITHUB_API_KEY }} From 8cfd22788244135bf7c3a860af44cea1b7a690e5 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Tue, 17 Mar 2026 11:42:33 -0700 Subject: [PATCH 4/5] chore: remove Cursor IDE configuration rules --- .cursor/rules/bun.mdc | 14 -------------- .cursor/rules/pr-conventions.mdc | 32 -------------------------------- 2 files changed, 46 deletions(-) delete mode 100644 .cursor/rules/bun.mdc delete mode 100644 .cursor/rules/pr-conventions.mdc diff --git a/.cursor/rules/bun.mdc b/.cursor/rules/bun.mdc deleted file mode 100644 index a9f18aba..00000000 --- a/.cursor/rules/bun.mdc +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: Use Bun instead of Node.js, npm, pnpm -globs: '*.ts, *.tsx, *.html, *.css, *.js, *.jsx, package.json' -alwaysApply: false ---- - -Default to using Bun instead of Node.js. - -- Use `bun ` instead of `node ` or `ts-node ` -- Use `bun build ` instead of `webpack` or `esbuild` -- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install` -- Use `bun run