From 1955c5b87194db2c2ec04b3c4af29206b343d553 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Thu, 5 Mar 2026 14:17:31 -0800 Subject: [PATCH 1/3] feat(android): update for 2.7.5 --- .gitignore | 1 + content/docs/android/changelog.mdx | 13 ++++ content/docs/android/index.mdx | 2 +- content/docs/android/quickstart/install.mdx | 6 +- .../docs/android/sdk-reference/Superwall.mdx | 5 +- content/docs/android/sdk-reference/index.mdx | 2 +- package.json | 3 +- scripts/download-references.ts | 62 +++++++++++++++++++ 8 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 scripts/download-references.ts diff --git a/.gitignore b/.gitignore index 94afcf22..f17f7018 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ dist .tanstack .source +reference/ .env .env.local diff --git a/content/docs/android/changelog.mdx b/content/docs/android/changelog.mdx index 311ad97b..43e266af 100644 --- a/content/docs/android/changelog.mdx +++ b/content/docs/android/changelog.mdx @@ -3,6 +3,19 @@ title: "Changelog" description: "Release notes for the Superwall Android SDK" --- +## 2.7.5 + +### Enhancements + +- Add appstack integration attribute identifier + +### Fixes + +- Ensure test mode does not interfere with expo +- Ensure isActive is properly returned and not calculated via expiration date +- Fix potential memory leak when webview crashes +- Ensure O(n) cleanup doesn't run multiple times + ## 2.7.4 ### Enhancements diff --git a/content/docs/android/index.mdx b/content/docs/android/index.mdx index 3c23f791..59cbb7b7 100644 --- a/content/docs/android/index.mdx +++ b/content/docs/android/index.mdx @@ -42,4 +42,4 @@ If you have feedback on any of our docs, please leave a rating and message at th If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-android/issues). - + diff --git a/content/docs/android/quickstart/install.mdx b/content/docs/android/quickstart/install.mdx index 969519da..0b2f1fd0 100644 --- a/content/docs/android/quickstart/install.mdx +++ b/content/docs/android/quickstart/install.mdx @@ -20,16 +20,16 @@ can find the [latest release here](https://github.com/superwall/Superwall-Androi ```gradle build.gradle -implementation "com.superwall.sdk:superwall-android:2.7.4" +implementation "com.superwall.sdk:superwall-android:2.7.5" ``` ```kotlin build.gradle.kts -implementation("com.superwall.sdk:superwall-android:2.7.4") +implementation("com.superwall.sdk:superwall-android:2.7.5") ``` ```toml libs.version.toml [libraries] -superwall-android = { group = "com.superwall.sdk", name = "superwall-android", version = "2.7.4" } +superwall-android = { group = "com.superwall.sdk", name = "superwall-android", version = "2.7.5" } // And in your build.gradle.kts dependencies { diff --git a/content/docs/android/sdk-reference/Superwall.mdx b/content/docs/android/sdk-reference/Superwall.mdx index e5cfad2b..e6458569 100644 --- a/content/docs/android/sdk-reference/Superwall.mdx +++ b/content/docs/android/sdk-reference/Superwall.mdx @@ -144,7 +144,10 @@ Superwall.instance.setIntegrationAttributes( mapOf( AttributionProvider.ADJUST to "adjust_user_id_123", AttributionProvider.MIXPANEL to "mixpanel_distinct_id_456", - AttributionProvider.META to "meta_user_id_789" + AttributionProvider.META to "meta_user_id_789", + AttributionProvider.GOOGLE_ADS to "google_ads_id_101", + AttributionProvider.GOOGLE_APP_SET to "google_app_set_id_202", + AttributionProvider.APPSTACK to "appstack_user_id_303" ) ) ``` diff --git a/content/docs/android/sdk-reference/index.mdx b/content/docs/android/sdk-reference/index.mdx index 0a37af33..21ee2a57 100644 --- a/content/docs/android/sdk-reference/index.mdx +++ b/content/docs/android/sdk-reference/index.mdx @@ -15,4 +15,4 @@ If you have feedback on any of our docs, please leave a rating and message at th If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-android/issues). - + diff --git a/package.json b/package.json index c8539769..3983beef 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "sideEffects": false, "scripts": { "generate:changelog": "bun run scripts/generate-changelog.ts", + "download:references": "bun run scripts/download-references.ts", "test": "bun test", "predev": "bun run scripts/copy-docs-images.cjs", "dev": "vite dev", @@ -74,4 +75,4 @@ "vite-tsconfig-paths": "^6.1.1", "wrangler": "^4.69.0" } -} \ No newline at end of file +} diff --git a/scripts/download-references.ts b/scripts/download-references.ts new file mode 100644 index 00000000..c515bcec --- /dev/null +++ b/scripts/download-references.ts @@ -0,0 +1,62 @@ +import { $ } from "bun"; +import { existsSync, mkdirSync, unlinkSync } from "node:fs"; +import { join } from "node:path"; + +const repositories = [ + { name: "ios", url: "https://github.com/superwall/superwall-ios.git" }, + { name: "android", url: "https://github.com/superwall/superwall-android.git" }, + { name: "flutter", url: "https://github.com/superwall/Superwall-Flutter.git" }, + { name: "expo", url: "https://github.com/superwall/expo-superwall.git" }, + { name: "react-native", url: "https://github.com/superwall/react-native-superwall.git" }, +]; + +const referenceDir = join(process.cwd(), "reference"); + +if (!existsSync(referenceDir)) { + mkdirSync(referenceDir, { recursive: true }); + console.log("Created reference directory"); +} + +for (const repo of repositories) { + const repoPath = join(referenceDir, repo.name); + + if (!existsSync(repoPath)) { + console.log(`Cloning ${repo.name}...`); + try { + await $`git -C ${referenceDir} clone ${repo.url} ${repo.name}`; + console.log(`Cloned ${repo.name}`); + } catch (error) { + console.error(`Failed to clone ${repo.name}:`, error); + continue; + } + } else { + if (!existsSync(join(repoPath, ".git"))) { + console.error(`Skipping ${repo.name}: ${repoPath} exists but is not a git repository`); + continue; + } + + console.log(`Updating ${repo.name}...`); + try { + await $`git -C ${repoPath} fetch --all --tags --prune`; + await $`git -C ${repoPath} pull --ff-only`; + console.log(`Updated ${repo.name}`); + } catch (error) { + console.error(`Failed to update ${repo.name}:`, error); + } + } + + if (repo.name === "react-native") { + const testFilePath = join(repoPath, "src", "__tests__", "index.test.tsx"); + + if (existsSync(testFilePath)) { + try { + unlinkSync(testFilePath); + console.log(`Removed ${testFilePath}`); + } catch (error) { + console.error(`Failed to remove ${testFilePath}:`, error); + } + } + } +} + +console.log("\nAll reference repositories have been processed."); From 24d73cc9d0b202ea4cd279d4738fa359ff2e511a Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Thu, 5 Mar 2026 14:28:13 -0800 Subject: [PATCH 2/3] fix: keep reference sync checkout clean --- scripts/download-references.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/download-references.ts b/scripts/download-references.ts index c515bcec..e5c1a196 100644 --- a/scripts/download-references.ts +++ b/scripts/download-references.ts @@ -1,5 +1,5 @@ import { $ } from "bun"; -import { existsSync, mkdirSync, unlinkSync } from "node:fs"; +import { existsSync, mkdirSync } from "node:fs"; import { join } from "node:path"; const repositories = [ @@ -45,18 +45,6 @@ for (const repo of repositories) { } } - if (repo.name === "react-native") { - const testFilePath = join(repoPath, "src", "__tests__", "index.test.tsx"); - - if (existsSync(testFilePath)) { - try { - unlinkSync(testFilePath); - console.log(`Removed ${testFilePath}`); - } catch (error) { - console.error(`Failed to remove ${testFilePath}:`, error); - } - } - } } console.log("\nAll reference repositories have been processed."); From ce40ac420a37b9d794a3fde8eee8c702485e5832 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Thu, 5 Mar 2026 15:13:31 -0800 Subject: [PATCH 3/3] fix: restore react-native test file before pull --- scripts/download-references.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/download-references.ts b/scripts/download-references.ts index e5c1a196..4adee9ad 100644 --- a/scripts/download-references.ts +++ b/scripts/download-references.ts @@ -1,5 +1,5 @@ import { $ } from "bun"; -import { existsSync, mkdirSync } from "node:fs"; +import { existsSync, mkdirSync, unlinkSync } from "node:fs"; import { join } from "node:path"; const repositories = [ @@ -9,6 +9,7 @@ const repositories = [ { name: "expo", url: "https://github.com/superwall/expo-superwall.git" }, { name: "react-native", url: "https://github.com/superwall/react-native-superwall.git" }, ]; +const reactNativeTestFileRelativePath = "src/__tests__/index.test.tsx"; const referenceDir = join(process.cwd(), "reference"); @@ -35,6 +36,11 @@ for (const repo of repositories) { continue; } + if (repo.name === "react-native") { + // Restore this file before pulling so prior local deletion doesn't block updates. + await $`git -C ${repoPath} checkout -- ${reactNativeTestFileRelativePath}`; + } + console.log(`Updating ${repo.name}...`); try { await $`git -C ${repoPath} fetch --all --tags --prune`; @@ -45,6 +51,18 @@ for (const repo of repositories) { } } + if (repo.name === "react-native") { + const testFilePath = join(repoPath, reactNativeTestFileRelativePath); + + if (existsSync(testFilePath)) { + try { + unlinkSync(testFilePath); + console.log(`Removed ${testFilePath}`); + } catch (error) { + console.error(`Failed to remove ${testFilePath}:`, error); + } + } + } } console.log("\nAll reference repositories have been processed.");