Within my React Native Expo application, I have implemented a feature to prevent screenshots using the expo package expo-screen-capture
. Additionally, in order to be able to read PDFs, I am utilizing the dev client. Therefore, upon installing the expo-screen-capture package, I had to acquire a new dev client. Upon importing the following:
import { usePreventScreenCapture } from "expo-screen-capture";
I encountered the following warnings :
new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method. WARNnew NativeEventEmitter()
was called with a non-null argument without the requiredremoveListeners
method.
Removing the import statement eliminates the warning, but it also disables the screenshot prevention functionality. Although LogBox can be used to ignore this warning, I am seeking a more permanent solution.