Conversation
# Why Unlike Android, which provides built-in app switcher protection through the FLAG_SECURE window flag, iOS doesn't offer an official API to protect app content in the app switcher or background mode. This PR implements a custom solution that addresses this privacy gap. # How The feature uses iOS app lifecycle notifications (`willResignActive`/`didBecomeActive`) to automatically show/hide a configurable blur overlay when the app is inactive. It leverages `UIViewPropertyAnimator` for blur control and smooth animations, with blur intensity configurable from JavaScript via the Expo module bridge. # Test Plan To test this feature: Run the bare-expo app, navigate to the ScreenCapture screen, and enable "App Switcher Protection." Then, put the app in app switcher/background mode and verify that the screen is blurred. Next, disable the protection and put the app in app switcher/background mode again to confirm that the content is now visible. I've attached a screen recording of the testing process. https://github.com/user-attachments/assets/3d8d04cb-d57b-4d7e-849e-77dfde56b3ec # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why When using `ScreenStackItem` with presentation `formSheet`, the `flex` does not work on iOS. This is a known issue in screens - https://github.com/software-mansion/react-native-screens/blob/main/ios/RNSScreen.mm#L182 This PR adds warning, so that users can more easily spot the issue. For example for this code: ```tsx <Modal presentationStyle="formSheet" .... style={{ flex: 1, justifyContent: 'center', alignItems: 'center', }}> ... </Modal> ``` The modal content will be placed at the top of formsheet, because `flex: 1` will not work. For this reason the warning will be displayed. <img height="512" alt="image" src="https://github.com/user-attachments/assets/2f5def04-afc7-4711-a341-8301a3f5b68a" /> # How 1. Flattening the styles for modal and checking for `flex`. This will not catch 100% of cases, but should be good for most. # Test Plan 1. Manual testing # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
…import export plugin (#38111)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.3)
Can you help keep this open source service alive? 💖 Please sponsor : )