Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for images #36

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

marco-mumtak
Copy link

@marco-mumtak marco-mumtak commented Jan 9, 2024

Description

Add support for images on RNPreventScreenshot.enableSecureView method as argument.
Supports all types of URI such as https:// or file://

Solves #34

@riamon-v
Copy link

riamon-v commented Jan 9, 2024

Amazing ! Can it be merged ?

@meierrap
Copy link

Can't wait for this new feature ! Can it be merged ?

@killserver killserver merged commit 243590b into killserver:main Mar 14, 2024
@killserver
Copy link
Owner

thx!

@riamon-v
Copy link

Here is how to use it for IOS

import LockScreenImage from 'path-to-your-image';

const setScreenshotDisabled = async () => {
  const preventScreenImage = Image.resolveAssetSource(LockScreenImage).uri;

  RNPreventScreenshot.enabled(true);
  RNPreventScreenshot.enableSecureView(preventScreenImage);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants