How to prevent screenshot in selected screen in android and ios react native - react-native

Previously I used this package to prevent snapshot for selected screen in android and ios.
https://www.npmjs.com/package/react-native-privacy-snapshot
https://github.com/kristiansorens/react-native-flag-secure-android
But it's not maintained by the owner and not compatible with react-native version >0.60. Many example and question in the internet only show how to prevent snapshot for whole application. But I need to prevent snapshot only for selected screen.
I've tried to do with this example
https://medium.com/#jonaskuiler/creating-a-security-screen-on-ios-and-android-in-react-native-97703092e2de
But in android, it prevents whole apps. In ios, it works.

you can use nmp library, react-native-prevent-screenshot
for more confusions and a perfact understanding check this asnwer

Related

Expo: Remove iPad support on non published app

I'm completely new to React Native, Expo and App development in general.
I'm building a React Native app solely for iOS using Expo. I've finally managed to finish a version I'm happy with, tested with users etc. I've now been spending time adding all the required screenshots, text, info etc to App Store Connect in order to submit the app. While doing that, I learned that iPad app screenshots was mandatory, which I found weird.
I later found that I had "supportsTablet: true" in my App.json file, so it makes sense that it's expecting iPad pictures. After changing this and making a new build and submitting that, it's still a requirement.
After Google a bit I can see that it has been impossible to change this:
Removing iPad support from app
iOS App Submission : remove iPad support
iOS App Submission want to remove iPad support
This led me down the road of trying to upload the app as a new submission. I can't get this to work though. According to this documentation:
https://developer.apple.com/library/archive/qa/qa1623/_index.html
I should change bundle identifier and upload again. Changing this in app.json under expo.ios.bundleIdentifier doesn't work though, as I just get an error that I've already uploaded this app previously.
What are the steps I should do to reupload the app as a new submission, so that I can not support iPad?
In order to upload a new version, you must increase the version and the build number. You can find this if you open the project in Xcode under the General tab and the Identity section. In the same tab, you will see the Deployment Info section where you can untick the iPad. Check the picture attached.

Screenshot Lock not working in React native app on iOS devices

We want to lock screenshot on app screens in React Native app so that user is not allowed to take the screenshot. The feature is implemented successfully in android version of the same React Native app. But it is not working in iOS app which is published to app store. I have also tried react-native-prevent-screenshot plugin but that is also not locking screenshot in iOS version. I even implemented blurred view on appDelegate.m file to prevent screenshot capture in app, but even this did not have any impact. Can someone tell if Apple has banned this feature completely or there is possibility of some issue in coding. But I rule that out because it is working successfully in android apk. Please help

react-native code push: allowable code change?

I'm using react-native-code-push for my app.
I had released several versions that change only a few of js bugs, which worked fine.
Recently I realized that if a code pushed release involves any change of native code other than javascript, the app crashes while updating. I added several react native packages that need manual linking such as react-native-maps, and released update to some targeted versions hoping them to take those, but no luck.
Then what if an update only involves adding light libraries (using npm install) which don't require native linking? I wonder to what extent exactly the code push allows client-side code updating.
Basically, when you want to add some native code involving link you will have to rebuild your apk / ipa and re-upload it to the stores. If you want to add a new plugin without link there should not be any problem
One advice I could give is to only push bug fixes to your production app. You should not push new features with codepush since apple review (almost) all the applications.

Enable Popups in React Native WebView

I have a react native application(using react-native 0.43.3) that uses webview to show a web page used for online banking. That site loads a popup window with the login page.
With the ReactNative WebView this popup window in not shown. In native android to enable popup window showing I found out that I need to make webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true), but couldn't found a way to set this parameter when using ReactNative WebView.
Is there a way which I can achieve this with the WebView provided with ReactNative?
A while back I needed to fork the react-native framework because there is a bug in the iOS WebView when using javaScript bridge between react-native and native (iOS and Android), after some research I came to the conclusion that I must fork the repo in order to fix it so I did.
A week ago I needed the webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(boolean) method as well, so I went ahead and added it in my fork along with view.getSettings().setSupportZoom(boolean) and view.getSettings().setSupportMultipleWindows(supports).
If you want, here is my fork.
Please keep in mind that it means that you need to build react-native for android from source, more info on the matter can be found here, it's a bit of a hustle to be honest, but in some cases it's worth it.
the fork is from react-native 0.44.0, you should also keep in mind that if you use my fork, in means you probably wont be able to update version when they do come out, so it all depends on your needs in the end, worst case scenario you could always fork my fork and merge it with the newest version.
you can fetch my fork with npm by modifying you package.json file and then running npm update react-native
"dependencies": {
//...
"react-native": "samermurad/react-native#rctWebView-legacy-fix",
//...
}
I am planning to extract the fixes and build a separate WebView component, but I am currently too busy for that :/
I hope that helps:)

React Native Android setup details

With the release of React Native 0.29 the details about how to setup the env for Android were removed for all I can tell. Does anyone know why?
It seems like the steps mentioned in there are still necessary, no?
You can select the previous versions and view their docs easily. Just click on the Version Number found beside the React Native header. It'll list all the versions and the link to documents.
Archive lists