George Finn George Finn - 2 months ago 32
Android Question

Requiring unknown module "react-native-safari-view" in Release mode

I have a React Native project and it runs successfully on both simulators and devices for iOS.

However, for Android, it runs successfully on simulators without any problems, but when run on devices as a Release build, it gives me this error:

Requiring unknown module "react-native-safari-view".

I tried
npm cache clean
npm install
several times, but it does not work.

The module exists in
folder and it is also under

What could be the cause of this? Why does it happen only in Release builds?

Update: If this is difficult to fix, is it possible to generate a signed apk with the js bundle included in dev mode?


It is because react-native-safari-view module is not designed for Android.

Check this out: (inside file in GitHub)

var SafariViewManager = {
  test: function() {
    warning('Not yet implemented for Android.');
  isAvailable: function() {

Maybe you are initiating a SafariViewManager object and calling other functions like show() in index.ios.js without checking it isAvailable()?