wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.01k stars 2.68k forks source link

AppDelegate.m build error: "No visible @interface for 'RCTBundleURLProvider' ..." #7833

Open marandaneto opened 5 months ago

marandaneto commented 5 months ago

What happened?

AppDelegate.m build error: "No visible @interface for 'RCTBundleURLProvider' error when following https://wix.github.io/react-native-navigation/docs/installing#native-installation

The solution was to change the code snippet from:

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
...

to:

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
...

The fallbackResource was removed, found similar issue here https://github.com/expo/fyi/issues/70

What was the expected behaviour?

Compiles without issues

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

create new rn app latest version add latest react-native-navigation version

ran into https://github.com/wix/react-native-navigation/issues/7819 but patching files worked.

auto-linking didn't work so I had to patch the android and ios files manually following https://wix.github.io/react-native-navigation/docs/installing#manual-installation

try to compile, errors with AppDelegate.m build error: "No visible @interface for 'RCTBundleURLProvider' ..."

In what environment did this happen?

React Native Navigation version: 7.37.2 React Native version: 0.73.2 Has Fabric (React Native's new rendering system) enabled: (yes/no) no Node version: 18.19 Device model: iPhone 15 pro iOS version: 17