1

I’m using React Native and the package react-native-prevent-screenshot-ios-android to block screenshots in my app.

It works fine in LTR languages (English, etc.), but when the device language is Arabic (RTL), a very strange UI bug happens:

❗ Problem

Whenever I call:

enableSecureView();

on screen focus, and:

disableSecureView();

on blur, the entire iOS app layout shrinks from the bottom. Each time I navigate into/out of the screen, the UI becomes smaller and smaller.

This does NOT happen in LTR mode — only when RTL layout is active.

Example behavior:

  • Enter screen → enableSecureView() → layout slightly shrinks
  • Leave screen → disableSecureView()
  • Enter again → shrinks more
  • Repeat → UI becomes unusable

❗ Additional Issue

  • If I try to patch the iOS native file to fix the shrinking:

    • The layout bug is fixed.
    • BUT screenshot blocking no longer works on iOS (because the library uses a specific secureTextEntry + layer re-parenting hack).
  • Currently, I cannot achieve both:

    • RTL layout working
    • iOS screenshot blocking
Alparslan ŞEN
6801 gold badge9 silver badges28 bronze badges
asked Nov 16, 2025 at 19:40
2
  • It might be better to report an Issue at github.com/Praveencena88/… rather than to ask here. Commented Nov 16, 2025 at 21:15
  • Thanks. I'll report it there, though the repo seems unmaintained. It's worth noting that I've tested several alternative libraries, and they all share this exact same cumulative shrinking bug in RTL. It seems to be a fundamental issue with the native secureTextEntry hack on iOS rather than just this specific library. Commented Nov 20, 2025 at 14:28

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.