<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Praveen kumar on Medium]]></title>
        <description><![CDATA[Stories by Praveen kumar on Medium]]></description>
        <link>https://medium.com/@bpk.praveensankar?source=rss-9b9aa3b29920------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W98xsUd_OMzYCsGA0Il33g.png</url>
            <title>Stories by Praveen kumar on Medium</title>
            <link>https://medium.com/@bpk.praveensankar?source=rss-9b9aa3b29920------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 01:35:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bpk.praveensankar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Demystifying the Setup of Universal & Deep Links in React Native with ReactJS: Supporting Web…]]></title>
            <link>https://medium.com/@bpk.praveensankar/demystifying-the-setup-of-universal-deep-links-in-react-native-with-reactjs-supporting-web-c80d267edf41?source=rss-9b9aa3b29920------2</link>
            <guid isPermaLink="false">https://medium.com/p/c80d267edf41</guid>
            <category><![CDATA[universal-links]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[deep-linking]]></category>
            <dc:creator><![CDATA[Praveen kumar]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 19:24:48 GMT</pubDate>
            <atom:updated>2025-07-03T19:24:48.014Z</atom:updated>
            <content:encoded><![CDATA[<h3>Demystifying the Setup of Universal &amp; Deep Links in React Native with ReactJS: Supporting Web, Mobile, and Microservices (with Unified App Routing)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/0*WEZWCrv58b485Nw0" /></figure><p>In modern mobile development, enabling users to open your app through a web URL, QR code, or message is essential for a seamless experience. Whether you’re sharing documents, onboarding new users, or enabling third-party integrations, <strong>Universal Links</strong> and <strong>Deep Links</strong> form the foundation. Use both the Universal and Deep Links to make the app robust and configure them altogether.</p><blockquote>🔗 Deep Links: App-specific URI (e.g., yourdomain://route)</blockquote><blockquote>🌐 Universal Links: Web-based links (e.g., https://www.domain.com/route)</blockquote><blockquote>🎯 Purpose: Navigate to specific screens inside a mobile app from external sources</blockquote><p>Why To Use Both Deep Links and Universal Links?</p><ul><li>✅ Deep Links work offline &amp; with QR/internal apps</li><li>✅ Universal Links work from emails, browsers, social media</li><li>✅ Universal Links fallback to browser if app not installed</li><li>📦 Use both for full UX coverage across platforms</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z3Fn-jWWB3-eeJFP_nJb0g.png" /></figure><p>Architectural Flow for Links</p><ul><li>🔁 External trigger (QR/Broswer/Email) opens deep/universal link</li><li>📲 OS intercepts link → matches app handler</li><li>🧭 React Native uses linking config to route</li><li>🧬 Params extracted and screen rendered accordingly</li></ul><h3>Android Native Setup: Deep Links &amp; Universal Links</h3><p>Step 1: Add Intent Filters</p><p>In AndroidManifest.xml, add these inside your MainActivity:</p><ul><li>✅ To support <strong>universal links (https)</strong></li><li>✅ To support <strong>deep links (custom schemes)</strong></li></ul><pre>&lt;!-- Universal Links (autoVerify must be true) --&gt;<br>&lt;intent-filter android:autoVerify=&quot;true&quot;&gt;<br>  &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;<br>  &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;<br>  &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;<br>  &lt;data android:scheme=&quot;https&quot; android:host=&quot;www.link1.com&quot; /&gt;<br>  &lt;data android:scheme=&quot;https&quot; android:host=&quot;www.link2.com&quot; /&gt;<br>&lt;/intent-filter&gt;<br><br>&lt;!-- Custom Scheme Deep Links --&gt;<br>&lt;intent-filter&gt;<br>  &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;<br>  &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;<br>  &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;<br>  &lt;data android:scheme=&quot;customlink://link1&quot; /&gt;<br>&lt;data android:scheme=&quot;customlink://link2&quot; /&gt;<br>&lt;/intent-filter&gt;</pre><p>Step 2 : Host assetlinks.json</p><p>Android checks this file to verify the link is allowed to open the app.</p><p>📍 Host this file in your root folder of ngnix server for each domains individually:</p><p>https://<a href="https://medium.com/www.link1.com">www.link1.com</a>/.well-known/assetlinks.json</p><p>https://<a href="https://medium.com/www.link1.com">www.link2.com</a>/.well-known/assetlinks.json</p><pre>[<br>  {<br>    &quot;relation&quot;: [&quot;delegate_permission/common.handle_all_urls&quot;],<br>    &quot;target&quot;: {<br>      &quot;namespace&quot;: &quot;android_app&quot;,<br>      &quot;package_name&quot;: &quot;com.yourapp.app_name&quot;,<br>      &quot;sha256_cert_fingerprints&quot;: [<br>        &quot;FE:C6:30:3C:12:4A:9D:F7:83:C2:E9:94:3F:62:EC:53:3C&quot;,<br>        &quot;finger print 2 if you have uploaded app to playstore, use upload keystore to fetch fingerprints and add&quot;<br>      ]<br>    }<br>  }<br>]</pre><p>To get the sha256_certificate :</p><pre>keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android</pre><p>Verify with:</p><pre>curl -I https://www.link1.com/.well-known/assetlinks.json</pre><h3>iOS Universal Links Setup</h3><p><strong>Purpose:</strong><br> To allow iOS to open your app directly from a web URL (https://yourdomain.com/path), bypassing Safari.</p><h3>🧩 Steps in Apple Developer Account</h3><h4>1. Enable Associated Domains</h4><ul><li>Go to <a href="https://developer.apple.com/">https://developer.apple.com</a></li><li>Navigate to <strong>Certificates, Identifiers &amp; Profiles</strong></li><li>Select your App ID &gt; Edit &gt; Enable ✅ Associated Domains</li></ul><p><strong>2. Enable Associated Domains in Xcode<br></strong>In Xcode, go to <strong>Signing &amp; Capabilities</strong> → Add <strong>Associated Domains</strong> Add your domain:</p><p>Add the domains:</p><pre>applinks:domain.link1.com<br>applinks:domain.link2.com</pre><p><strong>3. Create </strong><strong>apple-app-site-association (AASA)</strong></p><p><strong>URL:</strong><br> <a href="https://yourdomain.com/.well-known/apple-app-site-association">https://yourdomain.com/.well-known/apple-app-site-association</a></p><p><strong>File Format:</strong></p><pre>{<br>  &quot;applinks&quot;: {<br>    &quot;apps&quot;: [],<br>    &quot;details&quot;: [<br>      {<br>        &quot;appID&quot;: &quot;TEAMID.com.organization.app_name&quot;,<br>        &quot;paths&quot;: [&quot;/route/test/a/doc/*&quot;]<br>      }<br>    ]<br>  }<br>}</pre><p><strong>TEAMID</strong> can be found in your Apple Developer &gt; Membership details.</p><ul><li>Must be served as JSON <strong>without extension</strong></li><li>Content-Type: application/json</li><li>No redirects allowed</li></ul><h3>4. Update Info.plist</h3><pre>&lt;key&gt;CFBundleURLTypes&lt;/key&gt;<br>&lt;array&gt;<br>  &lt;dict&gt;<br>    &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;<br>    &lt;array&gt;<br>      &lt;string&gt;app&lt;/string&gt;<br>    &lt;/array&gt;<br>  &lt;/dict&gt;<br>&lt;/array&gt;<br><br>&lt;key&gt;AssociatedDomains&lt;/key&gt;<br>&lt;array&gt;<br>  &lt;string&gt;applinks:domain.link1.com&lt;/string&gt;<br>  &lt;string&gt;applinks:domain.link2.com&lt;/string&gt;<br>&lt;/array&gt;</pre><p><strong>5. Add Native Linking Handlers in </strong><strong>AppDelegate.m</strong></p><pre>// Deep Link<br>- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary&lt;UIApplicationOpenURLOptionsKey,id&gt; *)options {<br>  return [RCTLinkingManager application:app openURL:url options:options];<br>}<br><br>// Universal Link<br>- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler {<br>  return [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];<br>}</pre><h3><strong>Microservices-based architecture</strong></h3><p>When working with <strong>Universal Links and Deep Links</strong> in a <strong>microservices-based architecture</strong> with <strong>main and slave servers</strong>, you must ensure the <strong>linking setup is consistent, secure, and centralized</strong>. Here’s how to handle it across environments and servers:</p><h3>1. Where to host .well-known files (AASA &amp; AssetLinks)</h3><p>These files <strong>must be hosted on the root of the domain</strong> that is being used in your deep or universal link. Example:</p><ul><li><strong>Main Production URL:</strong><br> https://domains.link1.com/.well-known/apple-app-site-association<br> <a href="https://hilbertapp.siemensgamesa.com/.well-known/assetlinks.json">https://domains.link1.com/.well-known/assetlinks.json</a></li><li><strong>Internal (slave/test) URL:</strong><br> https://<a href="https://hilbertapp.siemensgamesa.com/.well-known/assetlinks.json">domains.link1.com</a>/.well-known/apple-app-site-association<br> <a href="https://hilbertappint.siemensgamesa.com/.well-known/assetlinks.json">https://</a><a href="https://hilbertapp.siemensgamesa.com/.well-known/assetlinks.json">domains.link1.com</a><a href="https://hilbertappint.siemensgamesa.com/.well-known/assetlinks.json">/.well-known/assetlinks.json</a></li></ul><h3>🧩 2. Which server should host the .well-known folder?</h3><ul><li>✅ <strong>Only the domain mentioned in the link must serve the files</strong>.</li><li>If you use microservices under a <strong>reverse proxy/gateway (like NGINX or API Gateway)</strong>:</li><li>Set up a <strong>static file route</strong> /\.well-known/ in the <strong>gateway or web server</strong>.</li><li>Proxy or serve those files directly from a known service or static asset bucket (like S3).</li></ul><h3><strong>3. Important Rules for Hosting These Files</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUo91TUm2aMlGOjn2jwnsw.png" /></figure><h3><strong>4. Common Strategy in Microservices Setup</strong></h3><pre>https://domain.link1.com         &lt;- Gateway or main server<br> ├── /.well-known/apple-app-site-association<br> ├── /.well-known/assetlinks.json<br> ├── /api/…  (routed to respective microservices)</pre><blockquote>The <strong>gateway serves the </strong><strong>.well-known files</strong> directly (static folder).</blockquote><blockquote><strong>Mobile team updates the AASA and assetlinks.json</strong> with new paths and app IDs.</blockquote><blockquote>Use a CI/CD pipeline or configuration repo to manage these files securely.</blockquote><h3><strong>5. Multiple Services or Subdomains</strong></h3><p>If microservices are behind <strong>different subdomains</strong>, and you want to support deep links for all, you must:</p><ol><li>Add <strong>Associated Domains</strong> for each subdomain in your Apple Developer Account (and Xcode):</li></ol><pre>applinks:domain1.test.com<br>applinks:domain12.test.com<br>applinks:domain122.test.com<br>applinks:domain1222.test.com</pre><ol><li>Create .well-known/apple-app-site-association and assetlinks.json on each domain.</li></ol><h3>Example File Structure</h3><p><strong>On the server (gateway):</strong></p><pre>/var/www/html/.well-known/apple-app-site-association<br>/var/www/html/.well-known/assetlinks.json</pre><p><strong>NGINX Example Config:</strong></p><pre>location /.well-known/ {<br>    root /var/www/html;<br>    default_type application/json;<br>    try_files $uri =404;<br>}</pre><p><strong>Step-by-Step Implementation: Universal + Deep Link Support in React-Native (JS Code)</strong></p><p>In your App.js or RootNavigator.js, define:</p><pre>const linking = {<br>  prefixes: [<br>    &#39;https://domain1.test.com&#39;,<br>    &#39;https://domain2.test.com&#39;,<br>    &#39;https://domain3.test.com&#39;,<br>    &#39;https://domain4.test.com&#39;,<br>    // Custom deep link scheme (optional but recommended)<br>    &#39;customdomain1://&#39;,<br>    &#39;customdomain12://&#39;,<br>    &#39;customdomain112://&#39;,<br>    &#39;customdomain123://&#39;,<br>  ],<br>  config: {<br>    screens: {<br>      Home: &#39;&#39;,<br>      navScreen: &#39;test/domain/page1&#39;,<br>      NotFound: &#39;*&#39;,<br>    },<br>  },<br>};</pre><p>Then use this with your navigation container:</p><pre>import { NavigationContainer } from &#39;@react-navigation/native&#39;;<br><br>export default function App() {<br>  return (<br>    &lt;NavigationContainer linking={linking}&gt;<br>      {/* Your navigators */}<br>    &lt;/NavigationContainer&gt;<br>  );<br>}</pre><h3>Opening Links and Apps in React-Native</h3><ul><li>Use `Linking.openURL(url)` to navigate</li><li>Check app availability with `Linking.canOpenURL(url)`</li><li>Works for internal deep links and 3rd party apps</li></ul><pre>import { Linking } from &#39;react-native&#39;;<br><br>Linking.openURL(&#39;customdomain1://test/domain/page1&#39;);</pre><h3>💻 Web Fallback with React for Universal Links</h3><p>Create a static web page that tries to open app, else redirects to Play Store/ App Store:</p><pre>useEffect(() =&gt; {<br>  if (/iPhone|Android/i.test(navigator.userAgent)) {<br>    window.location.href = &#39;customdomain1://test/domain/page1&#39;;<br>    setTimeout(() =&gt; {<br>      window.location.href = &#39;https://domain1.test.com/fallback&#39;;<br>    }, 1500);<br>  }<br>}, []);</pre><p>Also offer a fallback button:</p><pre>&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.org.yourappname&quot;&gt;Open in Play Store&lt;/a&gt;</pre><h3>✅ Final Checklist</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGiMVPJYq_2qcUo9aPJ6WA.png" /></figure><h3>Summary</h3><ul><li>✅ Support both deep and universal links</li><li>📌 Always verify domains on Android via assetlinks.json</li><li>🍏 Register associated domains in iOS project</li><li>🔍 Test all flows: installed, not installed, fallback</li><li>🔧 Use consistent route patterns in all environments</li></ul><p>This completes your setup for robust, cross-platform linking in production and staging apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c80d267edf41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Block Screenshot and Screen Share/Recording in react-native iOS and Android Apps for a…]]></title>
            <link>https://medium.com/@bpk.praveensankar/how-to-block-screenshot-and-screen-share-recording-in-react-native-ios-and-android-apps-for-a-db66d5ebfe12?source=rss-9b9aa3b29920------2</link>
            <guid isPermaLink="false">https://medium.com/p/db66d5ebfe12</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[screenshots]]></category>
            <category><![CDATA[prevent-screen-recording]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Praveen kumar]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 15:30:58 GMT</pubDate>
            <atom:updated>2023-08-21T11:11:29.025Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Block Screenshot and Screen Share/Recording in react-native iOS and Android Apps for a specific Screen?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEv5MC0GYR--gOpTodgLxg.jpeg" /></figure><p>React native allows us to create the both the Android and iOS apps. And if we are creating an app for any organisation or for some personal work, there can be possibility that our app contains confidential data, which we don’t want to provide to the user’s other than our application. So we can prevent the confidential data loss by disabling certain hacks like taking screenshot, screen sharing and screen recording. In this article, we are going to see how i have achieved disabling those features in mobile applications using react native for individual screen’s. You can use the below npm library it works fine on iOS as well as Android devices.</p><blockquote><a href="https://www.npmjs.com/package/react-native-prevent-screenshot-ios-android?activeTab=readme">https://www.npmjs.com/package/react-native-prevent-screenshot-ios-android?activeTab=readme</a></blockquote><pre>npm install --save react-native-prevent-screenshot-ios-android</pre><p><strong>Android Demo</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*yZnuSC_ZLJ3HV1SKSXe7sQ.gif" /></figure><p><strong>iOS demo</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*KM6jniYWtZbceDglQhTj5g.gif" /></figure><p><strong>Disable Screenshot/Share/Recording in Android Apps:</strong></p><p>Android gives us the default built-in functionality to block the screenshot/recording/ sharing using a single Flag which is a one liner which we have to add the below line to our MainActivity.java file to block.</p><pre>WindowManager.LayoutParams.FLAG_SECURE </pre><blockquote>Display flag: Indicates that the display has a secure video output and supports compositing secure surfaces.</blockquote><blockquote>If this flag is not set then the display device may not have a secure video output; the user may see a blank region on the screen instead of the contents of secure surfaces or protected buffers.</blockquote><blockquote>Secure surfaces are used to prevent content rendered into those surfaces by applications from appearing in screenshots or from being viewed on non-secure displays. Protected buffers are used by secure video decoders for a similar purpose.</blockquote><blockquote>An application creates a window with a secure surface by specifying the WindowManager.LayoutParams#FLAG_SECURE window flag. Likewise, an application creates a SurfaceView with a secure surface by calling SurfaceView#setSecure before attaching the secure view to its containing window.</blockquote><p><strong>Disabling it for individual Screen’s in Android App’s</strong></p><p>The main challenge is to disable the screenshot for specific screen’s of the app the above flag allows to disable the screenshot for the entire app. You can add the below piece of code to enable/disable taking screenshot for your android app.</p><p>And You can export this functions as a react-native module in the projects main folder. so that you can access those functions by importing the NativeModule from ‘react-native’ library. And you can call those functions individually whereever the screencapturing has to be enabled or disabled accordingly.</p><pre>  @ReactMethod<br>  public void forbidScreenshot(Promise promise) {<br>    runOnUiThread(new Runnable() {<br>      @Override<br>      public void run() {<br>        try {<br>          getCurrentActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);<br>          promise.resolve(&quot;Done. Screenshot taking locked.&quot;);<br>        } catch(Exception e) {<br>          promise.reject(PREVENT_SCREENSHOT_ERROR_CODE, &quot;Forbid screenshot taking failure.&quot;);<br>        }<br>      }<br>    });<br>  }<br>  @ReactMethod<br>  public void allowScreenshot(Promise promise) {<br>    runOnUiThread(new Runnable() {<br>      @Override<br>      public void run() {<br>        try {<br>          getCurrentActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);<br>          promise.resolve(&quot;Done. Screenshot taking unlocked.&quot;);<br>        } catch (Exception e) {<br>          promise.reject(PREVENT_SCREENSHOT_ERROR_CODE, &quot;Allow screenshot taking failure.&quot;);<br>        }<br>      }<br>    });<br>  }<br>}</pre><blockquote>This android addFlag() used to add the security flag to the window, WindowManager.LayoutParams.FLAG_SECURE which disable’s the screen capturing functionality</blockquote><pre>getCurrentActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);</pre><blockquote>This android clearFlags() allows us to clear all the setFlags and we can capture the screen</blockquote><pre>getCurrentActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);</pre><p><strong>Disabling Screen Capturing in iOS devices :</strong></p><p>And when it comes to iOS App’s, I have tried mostly everything available out there but the result is, we can not restrict a user to taking screenshots in iOS by adding any simple piece of code like android.</p><p>But we can prevent it by using a hack</p><pre>-(void) addSecureTextFieldToView:(UIView *) view {<br>    UIView *rootView = [UIApplication sharedApplication].keyWindow.rootViewController.view;<br>    secureField = [[UITextField alloc] initWithFrame:rootView.frame];<br>    secureField.secureTextEntry = TRUE;<br>    secureField.userInteractionEnabled = FALSE;<br>    secureField.font = [UIFont systemFontOfSize:25];<br>    UIColor *color = [UIColor blackColor];<br>    NSTextAlignment alignment = NSTextAlignmentCenter;<br>    NSMutableParagraphStyle* alignmentSetting = [[NSMutableParagraphStyle alloc] init];<br>    alignmentSetting.alignment = alignment;<br>    secureField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@&quot;PlaceHolder Text&quot; attributes:@{NSForegroundColorAttributeName: color,NSParagraphStyleAttributeName : alignmentSetting}];<br>    secureField.adjustsFontSizeToFitWidth = true;<br>    secureField.placeholder = @&quot;This action has been restricted by your app.&quot;;   <br>    [view sendSubviewToBack:secureField];<br>    [view addSubview:secureField];<br>    [view.layer.superlayer addSublayer:secureField.layer];<br>    [[secureField.layer.sublayers objectAtIndex:0] addSublayer:view.layer];<br>}</pre><p>We can do this by adding a hidden secure UITextField using <em>userInteractionEnabled = FALSE</em> and making sure its secure by adding the <em>secureTextEntry = TRUE </em>to the created UITextField</p><p>And whenever there is screenshot taken we can throw another secureLayer its like another view on top of the existing view for certain time limit by setting certain duration</p><pre>- (void)handleAppStateActive {<br>    if  (self-&gt;obfuscatingView) {<br>        [UIView animateWithDuration: 0.3<br>                         animations: ^ {<br>                             self-&gt;obfuscatingView.alpha = 0;<br>                         }<br>                         completion: ^(BOOL finished) {<br>                             [self-&gt;obfuscatingView removeFromSuperview];<br>                             self-&gt;obfuscatingView = nil;<br>                         }<br>         ];<br>    }<br>}</pre><p>This below function allows us to get notified whenever the screenshot or share/recording has been taken on the app</p><blockquote>‘UIApplicationUserDidTakeScreenshotNotification<em>’ this is a property provided by the iOS to get us notified whenever this has been triggered we can throw our secure layer on top the app for certain duration</em></blockquote><pre>- (void) startObserving {<br>    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];<br>    // handle screenshot taken event<br>    [center addObserver:self selector:@selector(handleAppScreenshotNotification)<br>                            name:UIApplicationUserDidTakeScreenshotNotification<br>                            object:nil];<br><br>    hasListeners = TRUE;<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db66d5ebfe12" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>