Skip to content

v6.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:21
b111982

Minor Changes

  • #760 a895274 Thanks @officialasishkumar! - iOS now supports the fileName option for tmpfile captures, like Android: it is the prefix of the file name, followed by a unique suffix and the extension. iOS used to ignore fileName; it now rejects the capture when the name is shorter than 3 characters or contains /, as Android does.

  • #742 101a713 Thanks @gre! - Add the sizeUnit option ("dp" or "px") so width/height mean the same thing on every platform. Without it, they stay points/dp on iOS and Windows and pixels on Android and web.

Patch Changes

  • #761 6d52f61 Thanks @fabriziocucci! - Android: captureScreen now snapshots the window with PixelCopy (API 26+), so TextureViews such as maps or video keep their z-order with the views drawn above them. With handleGLSurfaceViewOnAndroid, or if PixelCopy fails, it falls back to the previous drawing path.

  • #746 013fbe9 Thanks @gre! - Android: stop using APIs deprecated in React Native 0.88 and Android (TurboReactPackage, getCurrentActivity(), GuardedAsyncTask, CompressFormat.WEBP), removing build warnings.

  • #745 352f3b6 Thanks @gre! - Android: drop Gradle syntax and attributes deprecated by Gradle 10 and AGP 8 (space-assignment properties, method-style compileSdkVersion/minSdkVersion, the manifest package attribute, the library versionCode/versionName). The namespace is now always set, so AGP 7 or older is no longer supported (React Native 0.80+ already requires AGP 8).

  • #737 0b970c9 Thanks @gre! - Android: ship explicit consumer ProGuard/R8 rules for the native module, instead of relying only on React Native's own keep rules.

  • #738 1b032e7 Thanks @gre! - Android: when the app does not define them, the library now defaults to compileSdkVersion 35 (was 34) and minSdkVersion 24 (was 21), and no longer sets a targetSdkVersion. React Native 0.80+ templates define these values, so most apps are unaffected.

  • #765 6e3cbfa Thanks @gre! - The fileName option now replaces characters other than letters, digits, ., _ and - with _ (with a dev warning), so the resulting tmpfile path is always safe to turn into a file:// URL.

  • #771 1da3a46 Thanks @saseungmin! - Use type-only imports so React Native consumers with verbatimModuleSyntax enabled can type-check the library source without TS1484 errors.

  • #747 deeaab2 Thanks @gre! - iOS: captureScreen uses the foreground scene's key window instead of the deprecated keyWindow, keeps working while the app is in the background, and rejects with a clear message when no window is available.

  • #774 a4be523 Thanks @gre! - Fix TypeScript errors in apps that enable exactOptionalPropertyTypes or noPropertyAccessFromIndexSignature. React Native type-checks this package's src/ (through the react-native export condition) with the app's own compiler options, where skipLibCheck does not apply.

  • #742 101a713 Thanks @gre! - Windows: read width/height as decimals instead of truncating them, and round half pixels away from zero (like JS Math.round), so sizeUnit produces the exact requested pixel size.

  • #740 1573f78 Thanks @gre! - Declare the Windows-only path capture option in the TypeScript types and the README. The Windows module already supported it.