Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find type 'RCTBridge' in scope #61

Closed
ronaldlangeveld opened this issue Dec 7, 2024 · 9 comments
Closed

Cannot find type 'RCTBridge' in scope #61

ronaldlangeveld opened this issue Dec 7, 2024 · 9 comments

Comments

@ronaldlangeveld
Copy link

ronaldlangeveld commented Dec 7, 2024

Hi!

Currently learning React Native for fun over weekends and a few months ago I tried expo-share-extension it worked perfectly fine.

However the past few weeks I've been coming across this as soon as I install the extension.

This morning again, on a brand now project, with pretty much nothing else installed and then running npx expo run:ios.

...ViewController.swift:16:36)

  14 | class ShareExtensionViewController: UIViewController {
  15 |   
> 16 |   private static var sharedBridge: RCTBridge?
     |                                    ^ cannot find type 'RCTBridge' in scope
  17 |   private weak var rootView: RCTRootView?
  18 |   private let loadingIndicator = UIActivityIndicatorView(style: .large)
  19 |   
  
  CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

I'm experimenting with a standard Expo development build (not Expo Go) and then installing expo-share-extension following the instructions on your readme and then running npx expo prebuild followed by npx expo run:ios, which then outputs the error above.

Not sure if it's a me problem, given my limited React Native knowledge or if I'm doing something completely wrong or if we're missing something in the docs?

Running MacOS, latest everything (including Expo & extension version).
I disabled new arch for in case as well.

Thanks in advance 🙏🏻

@MaxAst
Copy link
Owner

MaxAst commented Dec 10, 2024

Hey @ronaldlangeveld, thanks for reporting! I indeed just managed to repro, must have happened when I did the 2.0.0 releease. Not sure how that happened because I tested it with an example in examples 🤔 Looking into it now!

@MaheshtheDev
Copy link

@MaxAst , thanks. Having same issue! should we downgrade or are you working on any quick fix?

@ronaldlangeveld
Copy link
Author

ronaldlangeveld commented Dec 10, 2024

Thank you very much getting back to me @MaxAst! 🙏

@MaxAst
Copy link
Owner

MaxAst commented Dec 10, 2024

QQ, did you disable new arch in app.json?

Screenshot 2024-12-10 at 09 34 26

@MaheshtheDev
Copy link

I already disabled it @MaxAst

@MaxAst
Copy link
Owner

MaxAst commented Dec 10, 2024

okay, working on a fix, but not sure how long it'll take. If possible, downgrading to expo v51 would definitely be the quickest unblock for you, if possible

@MaxAst
Copy link
Owner

MaxAst commented Dec 10, 2024

@MaheshtheDev @ronaldlangeveld this is now fixed in 2.0.1, please upgrade! Apologies for the hiccup

@MaxAst MaxAst closed this as completed Dec 10, 2024
@ronaldlangeveld
Copy link
Author

Thank you very much @MaxAst . Will try again over the weekend. :)

@MaheshtheDev
Copy link

Thanks for quick response and fix @MaxAst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants