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

Build Error on iOS Simulator with ReactBridge #11

Closed
floydkim opened this issue Jul 13, 2024 · 5 comments
Closed

Build Error on iOS Simulator with ReactBridge #11

floydkim opened this issue Jul 13, 2024 · 5 comments

Comments

@floydkim
Copy link

Hi, thank you for creating such a convenient tool.

I encountered the following error when trying to build on the iOS simulator:

image image

I did not face this issue when building on a real device.

As a beginner in iOS development, I’m not sure if this is an issue with my environment or if it’s something that needs to be supported by the ReactBridge package.

Xcode version: 15.4
ReactBridge package version: 1.2.0 (latest)
React Native version: 0.73.8

@ikhvorost
Copy link
Owner

Hi!

ReactBridge is delivered as a library with source code and can be compiled for any needed platforms and works both real devices or simulators.

In your case try the following:

  1. Do Product > Clean Build Folder (Shift + Cmd + K)
  2. Do File > Packages >Reset Package Caches
  3. Quit Xcode or reboot your Mac

If it doesn't help you can try to delete DerivedData folder manually or remove and then add the package.

@floydkim
Copy link
Author

@ikhvorost
Thank you for your quick response. I tried what you suggested, but the issue wasn’t resolved.
However, when I changed the build target to the Rosetta simulator, the problem disappeared.
image

ReactBridge is delivered as a library with source code and can be compiled for any needed platforms and works both real devices or simulators.

I agree with you. but I don’t understand why it fails for a non-Rosetta.
Is there any way to successfully build for a non-Rosetta simulator target as well?

@floydkim
Copy link
Author

I Googled and found a hint. (this)
I tried building on a different device simulator (iPhone SE 3rd generation), and the build error did not occur.
But I encountered a runtime error where it couldn’t find the native components.
ERROR Invariant Violation: requireNativeComponent: "ImageSliderView" was not found in the UIManager.

so... it seems using the Rosetta simulator will make everyone happy.
However, using ReactBridge in a project where I collaborate with my colleagues might introduce some constraints for them, making me hesitant to adopt it.

@ikhvorost
Copy link
Owner

I use ReactBridge in my test and real projects and can compile and run on devices and arm/x86 simulators with no issues. So maybe your case is related to your project's configuration or your project has binary dependency with x86 simulator only and it causes the error on ReactBridge.

Try to make new clear sample app for React Native and add ReactBridge to test and verify.

@floydkim
Copy link
Author

I agree. it seems like the issue is related to my project’s configuration.

Thanks for the quick and friendly response.
I’ll close the issue 😃

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

2 participants