diff --git a/docs/screeb-team-release.md b/docs/screeb-team-release.md index 7da64a7..bd50b6e 100644 --- a/docs/screeb-team-release.md +++ b/docs/screeb-team-release.md @@ -15,15 +15,20 @@ Edit `sdk-versions.json`, then run `versions:sync` to update generated version r ## Local native SDK testing -Keep the repositories next to each other for the default local flow: +The native SDKs live in the screeb monorepo. Keep it next to this repository for +the default local flow: ```text Screeb/ sdk/ - sdk-android/ - sdk-ios/ + screeb/ + sdk-android/ + sdk-ios/ ``` +Override with `SCREEB_MONOREPO_PATH`, or per platform with +`SCREEB_ANDROID_SDK_PATH` / `SCREEB_IOS_SDK_PATH`. + Then build the wrapper or example with: ```bash @@ -33,6 +38,7 @@ SCREEB_USE_LOCAL_SDK=true Optional overrides: ```bash +SCREEB_MONOREPO_PATH=/absolute/path/to/screeb SCREEB_ANDROID_SDK_PATH=/absolute/path/to/sdk-android SCREEB_IOS_SDK_PATH=/absolute/path/to/sdk-ios ``` @@ -147,16 +153,21 @@ npm run verify:release -- --scope=android npm run verify:release -- --scope=flutter,react-native ``` -The matrix uses `SCREEB_USE_LOCAL_SDK=true` by default and expects the `sdk`, `sdk-android`, and `sdk-ios` repositories to be siblings. +The matrix uses `SCREEB_USE_LOCAL_SDK=true` by default and expects the screeb monorepo next to this repository, with the native SDKs under `screeb/sdk-android` and `screeb/sdk-ios`. + +The MAUI gate binds the Android AAR from the local Maven repository, so publish it first: + +```bash +cd ../screeb/sdk-android && ./gradlew :sdk:publishReleasePublicationToMavenLocal +``` Set `SCREEB_IOS_TEST_DESTINATION` to override the simulator used by the iOS SDK test step. ## Release checklist -1. Bump the native SDK versions in `../sdk-android` and/or `../sdk-ios`. +1. Release the native SDKs from the monorepo: `../screeb/sdk-ios/release.sh ` and/or `../screeb/sdk-android/release.sh `. 2. Edit `sdk-versions.json`. 3. Run `npm run versions:sync`. 4. Run `npm run versions:check`. 5. Run `npm run verify:release`. 6. Run `npm run size:sdks`. -7. Release the native SDKs. -8. Release the public wrappers with the updated native dependency versions. +7. Release the public wrappers with the updated native dependency versions. diff --git a/packages/sdk-android/CHANGELOG.md b/packages/sdk-android/CHANGELOG.md deleted file mode 100644 index 6195a8e..0000000 --- a/packages/sdk-android/CHANGELOG.md +++ /dev/null @@ -1,552 +0,0 @@ -# CHANGELOGS - -## Version 4.0.4 [2026-08-13] - -**Bug fixes 🐛** - -- An audio answer no longer asks the respondent for the camera, and a video answer no longer asks for permissions the survey does not need. Refusing one of them used to take the whole answer down. -- Recording works on the first attempt: Screeb told the survey the permission was granted before the respondent had even answered the system dialog. - -## Version 4.0.3 [2026-08-07] - -**Bug fixes 🐛** - -- Fixed rare crashes while session replay was recording, including when a survey was closed mid-recording, and on some hybrid apps (MAUI/Xamarin). -- Fixed anonymized session replay that could leave some text readable on low-resolution captures, for instance when the device was low on memory or overheating. -- Fixed Screeb links whose token contained special characters being cut off. - -## Version 4.0.2 [2026-07-08] - -**Improvements 🚀** - -- More robust session replay, even under heavy memory pressure. -- Lower CPU and memory usage while recording. -- In-app surveys and messages stay reliably in the foreground. - -## Version 3.2.0 [2026-04-17] - -**Improvements 🚀** - -- Better in-app survey/message display across more OEM devices. -- Improved keyboard behavior so content stays readable when typing. -- More robust error handling to avoid showing technical error pages. - -## Version 3.1.1 [2026-02-10] - -**Improvements 🚀** - -- Added `sessionReplay{start|stop}` commands. - -## Version 3.1.0 [2026-02-09] - -**Improvements 🚀** - -- Added `getIdentity` command. -- Added Callback result to debug and debugTargeting commands. -- Added file picker support for In-App Messages. -- Improved Session Replay for complex apps. - -## Version 3.0.0 [2026-01-12] - -**Improvements 🚀** - -- Session Replay in Beta. -- Added disableMirror to InitOptions to force disable In-App Messages mirroring and Session Replay. -- Ensure webview is not in the accessible tree when it is hidden. - -## Version 2.2.10 [2025-12-18] - -**Improvements 🚀** - -- Remove usage of device identifier. - -## Version 2.2.9 [2025-11-18] - -**Improvements 🚀** - -- Fixed Closing In-App Messages builder reopening it. - -## Version 2.2.8 [2025-11-12] - -**Improvements 🚀** - -- Force requests insets on start. - -## Version 2.2.7 [2025-11-05] - -**Improvements 🚀** - -- Enforce a non-zero size. - -## Version 2.2.6 [2025-11-05] - -**Improvements 🚀** - -- Added debugs. - -## Version 2.2.4→2.2.5 [2025-11-03] - -**Improvements 🚀** - -- Improved React Native and Flutter initOptions compatibility. -- Removed `useTopMostWindow`. - -## Version 2.2.3 [2025-11-03] - -**Improvements 🚀** - -- Added debug logs. - -## Version 2.2.2 [2025-10-31] - -**Improvements 🚀** - -- Added `useTopMostWindow` initOptions for advanced usage. -- Added public `attachToWindow` for advanced usage. - -## Version 2.2.1 [2025-10-31] - -**Improvements 🚀** - -- Enforce Screeb to be displayed over sibling views. - -## Version 2.2.0 [2025-10-23] - -**Improvements 🚀** - -- Added startMessage, closeMessage commands. -- Added optional distribution_id param to startSurvey. -- Added optional surveyId param to closeSurvey. - -## Version 2.1.17 [2025-10-15] - -**Improvements 🚀** - -- Support In-App Messages. - -## Version 2.1.16 [2025-10-15] - -**Improvements 🚀** - -- Removed deprecated "isFullscreenMode" InitOptions. -- Removed deprecated "automaticScreenDetection" InitOptions. - -## Version 2.1.15 [2025-07-09] - -**Improvements 🚀** - -- Camera and Microphone is now optionals. - -## Version 2.1.14 [2025-06-19] - -**Improvements 🚀** - -- Updated core version. - -## Version 2.1.13 [2025-04-09] - -**Improvements 🚀** - -- Fixed types. - -## Version 2.1.12 [2025-02-24] - -**Improvements 🚀** - -- Fixed "SDK is not ready". - -## Version 2.1.11 [2025-02-03] - -**Improvements 🚀** - -- Thread safety fixes. - -## Version 2.1.10 [2025-01-31] - -**Improvements 🚀** - -- Ensure commands execution orders. - -## Version 2.1.9 [2024-12-19] - -**Improvements 🚀** - -- Reduce memory usage caused by logging. - -## Version 2.1.8 [2024-10-02] - -**Improvements 🚀** - -- Add language parameter - -## Version 2.1.7 [2024-09-19] - -**Improvements 🚀** - -- Threads improvement. - -## Version 2.1.6 [2024-09-19] - -**Improvements 🚀** - -- Some proguards improvements. - -## Version 2.1.5 [2024-09-13] - -**Improvements 🚀** - -- Recover Sceeb webview when the rendered crash. - -## Version 2.1.4 [2024-09-12] - -**Improvements 🚀** - -- Increase Screeb provider priority - -## Version 2.1.3 [2024-08-07] - -**Improvements 🚀** - -- Improve views stacking compatibility. - -## Version 2.1.2 [2024-07-30] - -**Improvements 🚀** - -- Allow nullable hooks result. - -## Version 2.1.1 [2024-07-30] - -**Improvements 🚀** - -- Prepare support of new hooks in secondary SDK. - -## Version 2.1.0 [2024-07-29] - -**Improvements 🚀** - -- Support new `onSurveyDisplayAllowed` and `onMessageDisplayAllowed` hooks. -- Improved surveys hit boxes. -- Prepare support for in-app messages. -- Prepare support for session recording. -- Fixed destroy animation. - -## Version 2.0.38 [2024-06-12] - -**Improvements 🚀** - -- Fixed activity resume. - -## Version 2.0.37 [2024-05-29] - -**Improvements 🚀** - -- Fixed unwanted insets. - -## Version 2.0.36 [2024-05-27] - -**Improvements 🚀** - -- Improved security. - -## Version 2.0.35 [2024-04-05] - -**Improvements 🚀** - -- Improved handling of activities switching. - -## Version 2.0.33 [2024-04-04] - -**Improvements 🚀** - -- Fixed a possible crash when receiving events. - -## Version 2.0.32 [2024-04-03] - -**Improvements 🚀** - -- Multi-platform support -- Don't waive webview when not visible. - -## Version 2.0.31 [2024-02-05] - -**Improvements 🚀** - -- Handle a rare case where a survey is not properly closed. - -## Version 2.0.30 [2024-02-02] - -**Improvements 🚀** - -- Switched from `play core` libs to `play review` libs. -- Improved commands encoding. - -## Version 2.0.29 [2024-02-01] - -**Improvements 🚀** - -- Fixed a possible crash on old devices. - -## Version 2.0.28 [2024-01-09] - -**Improvements 🚀** - -- Improved context tracking. -- Improved multi-process support. - -## Version 2.0.27 [2023-12-18] - -**Improvements 🚀** - -- Avoid overriding input soft mode on start. - -## Version 2.0.26 [2023-12-11] - -**Improvements 🚀** - -- Improve errors reporting. -- Warn about debug mode enabled. - -## Version 2.0.25 [2023-11-21] - -**Improvements 🚀** - -- Improve compatibility with other webviews. - -## Version 2.0.23→2.0.24 [2023-10-27] - -**Improvements 🚀** - -- Fixed an exception and lifecycle when calling closeSdk. - -## Version 2.0.20→2.0.22 [2023-10-24] - -**Improvements 🚀** - -- Fixed a possible crash during init of SDK. - -## Version 2.0.19 [2023-09-12] - -**Improvements 🚀** - -- Added new init option "isDebugMode" - -## Version 2.0.18 [2023-09-11] - -**Improvements 🚀** - -- Added commands queue to execute these commands when SDK is loaded. -- Log more possible errors. - -## Version 2.0.16→2.0.17 [2023-09-07] - -**Improvements 🚀** - -- Fixed keyboard overlap for older Android versions. - -## Version 2.0.15 [2023-09-07] - -**Improvements 🚀** - -- Downgrade AGP from 7.4.2 to 7.1.3 for legacy support. - -## Version 2.0.14 [2023-09-06] - -**Improvements 🚀** - -- Upgrade Kotlin version from 1.5.21 to 1.6.0 for legacy support. - -## Version 2.0.13 [2023-09-04] - -**Improvements 🚀** - -- Downgrade Kotlin version from 1.8.22 to 1.5.21 for legacy support. - -## Version 2.0.12 [2023-09-01] - -**Improvements 🚀** - -- Fix a case where the survey was not displayed. - -## Version 2.0.11 [2023-09-01] - -**Improvements 🚀** - -- Force keyboard to not overlap the survey. - -## Version 2.0.10 [2023-08-31] - -**Improvements 🚀** - -- Improve insets handling. - -## Version 2.0.9 [2023-08-24] - -**Improvements 🚀** - -- Improve thread safety. - -## Version 2.0.8 [2023-08-23] - -**Improvements 🚀** - -- Unobfuscate InitOption param. - -## Version 2.0.7 [2023-08-22] - -**Improvements 🚀** - -- Avoid the keyboard overlapping the survey. - -## Version 2.0.5→2.0.6 [2023-08-21] - -**Improvements 🚀** - -- Allow seamless integration with Flutter/React-native. - -## Version 2.0.3 [2023-08-18] - -**Improvements 🚀** - -- Fixed surveys not showing in some cases. - -## Version 2.0.2 [2023-08-16] - -**Improvements 🚀** - -- Improve compatibility with other webviews packages. - -## Version 2.0.1 [2023-08-04] - -**Improvements 🚀** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- Reduced dependencies from 23 to 5 and the size from ~1MB to ~27KB. -- Minimum Android SDK has been reduced from 21 to 19. -- New feature called hooks - -**Improvements 🚀 (Same as 2.0.0 but improves compatibility with Flutter/React-native)** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- Reduced dependencies from 23 to 8 and the size from ~1MB to ~36KB. - -## Version 2.0.0-rc.2 [2023-07-31] - -**Improvements 🚀** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- Reduced dependencies from 23 to 5 and the size from ~1MB to ~27KB. -- Minimum Android SDK has been reduced from 21 to 19. -- Improved Flutter/React native compatibility. - -## Version 2.0.0-rc.1 [2023-07-05] - -**Improvements 🚀** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- Reduced dependencies from 23 to 8 and the size from ~1MB to ~36KB. - -## Version 1.13.6→1.13.7 [2023-06-12] - -**Improvements 🚀** - -- Fixed exception in internal coroutine. - -## Version 1.13.5 [2023-06-07] - -**Improvements 🚀** - -- New "Range rating" type of questions. - -## Version 1.13.4 [2023-05-24] - -**Improvements 🚀** - -- Fixed crash when the host can't be resolved. - -## Version 1.13.3 [2023-05-18] - -**Improvements 🚀** - -- Improve logger. -- Fixed moshi IllegalArgumentException. -- Fixed App Version Targeting. - -## Version 1.13.1→1.13.2 [2023-05-11] - -**Improvements 🚀** - -- Fix multiple "End survey" buttons. - -## Version 1.13.0 [2023-04-13] - -**Improvements 🚀** - -- Fix a bug on buttons having no emoji. - -## Version 1.12.3 [2023-03-31] - -**Improvements 🚀** - -- Upgrade vanniktech/Emoji dependency. - - Relative to issue: https://github.com/ScreebApp/sdk-android-public/issues/3 - -## Version 1.12.2 [2023-03-29] - -**Improvements 🚀** - -- Better log management. - -## Version 1.12.1 [2023-03-10] - -**Improvements 🚀** - -- Validation event and group name. -- Disable Automatic screen detection. - -## Version 1.12.0 [2023-02-09] - -**Improvements 🚀** - -- Added debug and debugTargeting commands. -- Added resetIdentity command. -- Added closeSdk command. - -## Version 1.11.1 [2023-01-25] - -**Improvements 🚀** - -- Remove AppGlideModule override. - - → https://bumptech.github.io/glide/doc/configuration.html#avoid-appglidemodule-in-libraries - -## Version 1.11.0 [2023-01-25] - -**Improvements 🚀** - -- Added Response expiration. - -## Version 1.10.10 [2023-01-24] - -**Improvements 🚀** - -- Fixed validation issues in visitor properties. - -## Version 1.10.9 [2022-12-22] - -**Improvements 🚀** - -- Dependencies update. - -## Version 1.10.7→1.10.8 [2022-12-07] - -**Improvements 🚀** - -- Fixed crash on unexpected question/answer flow. -- Fixed unexpected behavior on response closing. - -## Version 1.10.5→1.10.6 [2022-10-29] - -**Improvements 🚀** - -- Replace numeric emojis by custom SVG. -- Fixed Survey superposition on the app. diff --git a/packages/sdk-ios/CHANGELOG.md b/packages/sdk-ios/CHANGELOG.md deleted file mode 100644 index 3ac80b2..0000000 --- a/packages/sdk-ios/CHANGELOG.md +++ /dev/null @@ -1,355 +0,0 @@ -# CHANGELOGS - -## Version 4.0.4 [2026-08-13] - -**Bug fixes 🐛** - -- Respondents can attach a picture again: tapping the attach button in a survey now opens the system photo menu, where it previously did nothing at all. -- The photo library no longer opens behind the survey, where its photos could be seen but not tapped. - -**Improvements 🚀** - -- The attach menu is the iOS one: photo library, camera and files, in the language of the device, filtered to the picture formats a survey accepts. - -## Version 4.0.3 [2026-08-07] - -**Bug fixes 🐛** - -- Fixed a rare crash that could close the app while session replay was recording. -- Fixed a crash when the app was opened from a malformed Screeb link. -- Fixed a crash that could happen on the first network error after startup. -- Screeb no longer closes the app when memory runs low while recording: it skips a frame instead. -- Fixed the order of screen and event tracking, so events are always attached to the screen they happened on. -- Fixed occasional instability when Screeb methods are called from a background thread. - -**Improvements 🚀** - -- Session replay stays light for the whole session on apps where it could previously fall back to full-screen captures. -- Command callbacks and survey hooks are called back on a background thread again, as they were before 4.0.2. - -## Version 4.0.2 [2026-07-08] - -**Improvements 🚀** - -- More robust session replay, even under heavy memory pressure. -- Lower CPU and memory usage while recording. -- In-app surveys and messages stay reliably in the foreground. - -## Version 3.1.1 [2026-02-10] - -**Improvements 🚀** - -- Added `sessionReplay{start|stop}` commands. - -## Version 3.1.0 [2026-02-09] - -**Improvements 🚀** - -- Added `getIdentity` command. -- Added Callback result to debug and debugTargeting commands. - -## Version 3.0.3 [2026-02-06] - -**Improvements 🚀** - -- Added file picker for In-App messages video. - -## Version 3.0.2 [2026-01-13] - -**Improvements 🚀** - -- Hotfixes. - -## Version 3.0.1 [2026-01-12] - -**Improvements 🚀** - -- Ensure webview is not in the accessible tree when it is hidden. - -## Version 3.0.0 [2026-01-12] - -**Improvements 🚀** - -- Session Replay in Beta. -- Added disableMirror to InitOptions to force disable In-App messages mirroring and Session Replay. - -## Version 2.2.4 [2025-12-04] - -**Improvements 🚀** - -- Fixed SDK methods Objective-C type. - -## Version 2.2.2 [2025-11-18] - -**Improvements 🚀** - -- AnyEncodable is now unneeded and should be removed. -- SDK methods are now Objective-C compatible. -- Fixed Closing In-App messages builder reopening it. - -## Version 2.2.1 [2025-10-23] - -**Improvements 🚀** - -- Thread safety fixes. - -## Version 2.2.0 [2025-10-23] - -**Improvements 🚀** - -- Added startMessage, closeMessage commands. -- Added optional surveyId param to closeSurvey. - -## Version 2.1.14 [2025-10-16] - -**Improvements 🚀** - -- Support In-App Messages. -- Removed deprecated "automaticScreenDetection" InitOptions. -- Bump min iOS version to 12.0. - -## Version 2.1.13 [2025-06-18] - -**Improvements 🚀** - -- Ensure sequential messages consume. - -## Version 2.1.12 [2025-06-04] - -**Improvements 🚀** - -- Auto-recover on network change. -- Fixed hitboxes on keyboard visibility changes. -- Threads improvements. -- Added "distributionId" param to startSurvey. - -## Version 2.1.11 [2025-02-03] - -**Improvements 🚀** - -- Thread safety fixes. - -## Version 2.1.10 [2025-01-31] - -**Improvements 🚀** - -- Ensure commands execution orders. - -## Version 2.1.9 [2024-12-19] - -**Improvements 🚀** - -- Reduce memory usage caused by logging. - -## Version 2.1.8 [2024-12-09] - -**Improvements 🚀** - -- Fixed case where content is untouchable. - -## Version 2.1.7 [2024-10-02] - -**Improvements 🚀** - -- Add language parameter - -## Version 2.1.6 [2024-07-30] - -**Improvements 🚀** - -- Fixed double encoding. - -## Version 2.1.5 [2024-07-30] - -**Improvements 🚀** - -- Prepare support of new hooks in secondary SDK. - -## Version 2.1.4 [2024-07-29] - -**Improvements 🚀** - -- Fixed hook result encoding. - -## Version 2.1.3 [2024-07-29] - -**Improvements 🚀** - -- Support new `onSurveyDisplayAllowed` and `onMessageDisplayAllowed` hooks. - -## Version 2.1.2 [2024-07-22] - -**Improvements 🚀** - -- Fixed destroy animation. -- Improved key window handling. - -## Version 2.1.1 [2024-06-12] - -**Improvements 🚀** - -- Fixed error and message printing. -- Improved key window handling. - -## Version 2.1.0 [2024-05-28] - -**Improvements 🚀** - -- Improved surveys hit boxes. -- Prepare support for in-app messages. -- Prepare support for session recording. - -## Version 2.0.13 [2024-04-11] - -**Improvements 🚀** - -- Fixed possible non-interactive surveys - -## Version 2.0.12 [2024-04-10] - -**Improvements 🚀** - -- Allow lazy init SDK without any context -- Better handling of window switching #2 -- Fixed threads warnings - -## Version 2.0.11 [2024-04-05] - -**Improvements 🚀** - -- Multi-platform support -- Better handling of window switching - -## Version 2.0.10 [2024-02-05] - -**Improvements 🚀** - -- Improved commands encoding. -- Handle a rare case where a survey is not properly closed. - -## Version 2.0.9 [2024-01-09] - -**Improvements 🚀** - -- Improved context tracking. - -## Version 2.0.8 [2024-01-03] - -**Improvements 🚀** - -- Fixed Close/Init SDK lifecycle. - -## Version 2.0.7 [2023-12-11] - -**Improvements 🚀** - -- Properly handle SSL errors. - -## Version 2.0.4→2.0.6 [2023-12-11] - -**Improvements 🚀** - -- Improve errors reporting. -- Warn about debug mode enabled. - -## Version 2.0.3 [2023-09-08] - -**Improvements 🚀** - -- Allow to init SDK without context that'll default to the app one. -- Remove false translatesAutoresizingMaskIntoConstraints. - -## Version 2.0.1→2.0.2 [2023-09-08] - -**Improvements 🚀** - -- Added closeSurvey command. -- Fixed surveys not showing in some cases. -- Fixed surveys on screen rotation. - -## Version 2.0.0 [2023-08-02] - -**Improvements 🚀** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- All SDK dependencies have been removed, and the minimum iOS version has been reduced from 12.4 to 11.0. - -**Improvements (PS: Same as rc.1, rc.2, and rc.3 but with a new feature called hooks) 🚀** - -- The SDK has been rewritten from scratch to provide greater stability, instant updates of Screeb features, and be even lighter. -- All SDK dependencies have been removed, and the minimum iOS version has been reduced from 12.4 to 11.0. - -## Version 1.13.2 [2023-06-07] - -**Improvements 🚀** - -- New "Range rating" type of questions - -## Version 1.13.1 [2023-05-17] - -**Improvements 🚀** - -- Fixed Version Targeting - -## Version 1.13.0 [2023-04-28] - -**Improvements 🚀** - -- `startSurvey` command now accepts the `ignoreSurveyStatus` argument (default: true) -- Better log management -- Fixed multiple "End survey" buttons - -## Version 1.12.4 [2023-04-21] - -**Improvements 🚀** - -- Added Swift Package Manager support -- Fixed a bug on buttons having no emoji. -- Retry request on network failure - -## Version 1.12.2→1.12.3 [2023-03-10] - -**Improvements 🚀** - -- Fixed Validation event and group name -- Fixed Disable Automatic screen detection - -## Version 1.12.1 [2023-02-24] - -**Improvements 🚀** - -- Build SDK with Xcode 13.2.1 and Swift 5.5.2 (1300.0.47.5) to fix compilation issue and support swift version 5.5.2+ - -## Version 1.12.0 [2023-02-09] - -**Improvements 🚀** - -- Added debug and debugTargeting commands -- Added resetIdentity command -- Added closeSdk command -- Fixed survey closing on reduced mod - -## Version 1.11.0 [2023-01-25] - -**Improvements 🚀** - -- Response expiration - -## Version 1.10.5 [2023-01-24] - -**Improvements 🚀** - -- Fixed validation issues in visitor properties - -## Version 1.10.4 [2022-10-29] - -**Improvements 🚀** - -- Make targeting more reliable in order to **not** trigger survey in a corner-case - -## Version 1.10.3 [2022-10-18] - -**Improvements 🚀** - -- Replace numeric emojis by custom SVG -- Fixed Survey superposition on the app diff --git a/scripts/build-local-ios-xcframework.mjs b/scripts/build-local-ios-xcframework.mjs index 062ccd6..d538e3e 100755 --- a/scripts/build-local-ios-xcframework.mjs +++ b/scripts/build-local-ios-xcframework.mjs @@ -45,7 +45,11 @@ function removeFilesMatching(path, matcher) { } } -const sdkIosPath = resolve(argValue("--sdk-ios") || process.env.SCREEB_IOS_SDK_PATH || resolve(root, "../sdk-ios")); +const sdkIosPath = resolve( + argValue("--sdk-ios") + || process.env.SCREEB_IOS_SDK_PATH + || resolve(process.env.SCREEB_MONOREPO_PATH || resolve(root, "../screeb"), "sdk-ios"), +); const output = resolve(argValue("--output") || process.env.SCREEB_IOS_XCFRAMEWORK_PATH || resolve(root, ".local/ios/Screeb.xcframework")); mkdirSync(dirname(output), { recursive: true }); // mkdtemp requires an existing parent const workDir = mkdtempSync(resolve(dirname(output), ".build-")); diff --git a/scripts/verify-release.mjs b/scripts/verify-release.mjs index fb3b91f..9ac4827 100644 --- a/scripts/verify-release.mjs +++ b/scripts/verify-release.mjs @@ -7,8 +7,15 @@ import { dirname, relative, resolve } from "node:path"; import { fileURLToPath } from "node:url"; const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); -const androidRoot = resolve(root, "../sdk-android"); -const iosRoot = resolve(root, "../sdk-ios"); +// The native SDKs live in the screeb monorepo; the env vars keep any other +// checkout usable (worktrees, agents, CI with a different layout). +const monorepoRoot = process.env.SCREEB_MONOREPO_PATH || resolve(root, "../screeb"); +const androidRoot = process.env.SCREEB_ANDROID_SDK_PATH + ? resolve(process.env.SCREEB_ANDROID_SDK_PATH) + : resolve(monorepoRoot, "sdk-android"); +const iosRoot = process.env.SCREEB_IOS_SDK_PATH + ? resolve(process.env.SCREEB_IOS_SDK_PATH) + : resolve(monorepoRoot, "sdk-ios"); const isMac = platform() === "darwin"; function envWithTooling(extra = {}) { @@ -61,7 +68,7 @@ const checks = [ cwd: androidRoot, command: "./gradlew :sdk:testDebugUnitTest :sdk:lintRelease :sdk:assembleRelease --no-daemon", skip: () => !existsSync(resolve(androidRoot, "settings.gradle")) && !existsSync(resolve(androidRoot, "settings.gradle.kts")), - reason: "sdk-android checkout not found next to sdk", + reason: "sdk-android not found in the screeb monorepo", }, { scope: "flutter", @@ -107,7 +114,7 @@ const checks = [ cwd: iosRoot, command: () => `xcodebuild test -scheme Screeb-Package -destination '${defaultIosTestDestination()}' -quiet`, skip: () => !isMac || !existsSync(resolve(iosRoot, "Package.swift")), - reason: "sdk-ios checkout or macOS/Xcode toolchain not available", + reason: "sdk-ios not found in the screeb monorepo, or no macOS/Xcode toolchain", }, ];