New Architecture
该库已更新以支持 New Architecture。从 1.8.0 版本起提供全面支持。
测试版本 (v2.0.0 - beta5)
- npm
- yarn
- pnpm
npm install react-native-screenguard@2.0.0-beta5
yarn add react-native-screenguard@2.0.0-beta5
pnpm add react-native-screenguard@2.0.0-beta5
- 由于缺少对 RN 0.67 和 0.59 及以下版本的支持而重新发布。
最新版本 (v2.0.1 - stable)
- npm
- yarn
- pnpm
npm install react-native-screenguard@2.0.1
yarn add react-native-screenguard@2.0.1
pnpm add react-native-screenguard@2.0.1
此版本继续支持 v2.0.0 并包含一些 改进。
- 修复了 Android 上
limitCaptureEvtCount无法正确触发事件的问题。 - 移除了 Android 上的未使用代码。
- 修复了 Android 上 React-native 0.82+ 的
ClassCastException问题 #125。
v2.0.0
What's New in v2.0.0
- separate screenshot and screen recording through
initSettings() - New
initSettings()API - Required initialization before using any other API - React Hooks -
useSGScreenShotanduseSGScreenRecordreplace manual event listeners - New
getScreenGuardLogs()API - Retrieve activity logs for debugging - Fixed Android keyboard issue - Text input no longer disabled when screenguard is active
- Improved settings - New options for fine-grained control over overlay display
- Removed deprecated APIs -
registerScreenshotEventListener,registerScreenRecordingEventListener,removeScreenshotEventListener,removeRecordingEventListener