How to do it...

  1. Let's begin by adding the mask image to the iOS portion of the app. We'll need to open the ios folder of the project in Xcode, located in the ios/ directory of the new React Native app.
  2. We can add the hidden.jpg image to the project by dragging and dropping the image into the Images.xcassets folder of the project in Xcode, as shown in this screenshot:
  1. Next we'll add a new implementation and two methods to the AppDelegate.m file. The entirety of the file can be found as follows, including generated code. The code we're adding is marked in bold for clarity. We're extending the applicationWillResignActive method, which will ...

Get React Native Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.