No visible @interface for 'RCTBundleURLProvider' declares the selector 'jsBundleURLForBundleRoot:fallbackResource:'

Viewed 2473

This is the error that i am getting when building the app.

I am getting this error after upgrading my react-native version from 0.66.2 to 0.68.2 in my Appdelegate.mm file.

enter image description here

1 Answers

After some research i got to know that jsBundleURLForBundleRoot:fallbackResource: no longer exists on RCTBundleURLProvider.

Fix:

Replace

return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

to

return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

Rebuild the app. and you are good to go.

As I wasn't able to find any solution on StackOverflow and it is our first go-to place to look for any issue. So, I decided to write this answer here.

Here's the original answer: https://github.com/facebook/react-native/issues/33451#issuecomment-1083618881

Related