0

I just implemented the ReactNativeNavigation library to my ios project using a swift AppDelegate file and when I build the project I get the error: 'No such module 'ReactNativeNavigation'

I have tried to install a previous version of the package and also tried to enable 'Copy only when installing' in the package itself.

My AppDelegate.swift file's parts using the package

import ReactNativeNavigation

...

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
    let jsCodeLocation = RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackResource: nil)
    ReactNativeNavigation.bootstrap(jsCodeLocation, launchOptions: launchOptions)

    return true
  }

Has anyone met with this issue or knows how to fix it? Thanks in advance!

Balázs
  • 15
  • 1
  • 4

1 Answers1

2

I had a similar situation recently with swift and ReactNativeNavigation, I fixed it by:

  • Removing "import ReactNativeNavigation" from AppDelegate.swift

  • add "#import <ReactNativeNavigation/ReactNativeNavigation.h>" to your "project"-Bridge-Header.h

  • clear build cache and build again.

Bachir
  • 144
  • 1
  • 5