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();
non 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
- 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)
So I cannot get both:
RTL layout working
iOS screenshot blocking
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
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();
n 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)
So I cannot get both:
RTL layout working
iOS screenshot blocking
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
iOS + RTL (Arabic) causes app layout shrinking when using react-native-prevent-screenshot-ios-android — layout reduces on each navigation
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();
n 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)
So I cannot get both:
RTL layout working
iOS screenshot blocking