My react native app previously built and ran on a simulator in xcode 11. However since upgrading to xcode 12.5 I get the following build errors
Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class>*'
Cannot initialize a parameter of type 'NSArray<Class> *' with an lvalue of type 'NSArray<id<RCTBridgeModule>> *__strong'
Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong'
These errors come from react-core which is in my project via cocoapods.
If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to get started. If you already have one of these tools installed, you should be able to get up and running within a few minutes.
Compared to a framework, a Swift app will perform better in most cases. Although it can consume more CPU power when running an application, Swift provides better performance than React Native.
All in all, React Native and Swift are both great tools for building iOS apps. To figure out which one suits your project better, you need to take advantage of their peculiarities. React Native supports building apps for iOS, Android, and web from a single code base.
Change RCTCxxBridge.mm
624 line
Code Block Objective-C
NSArray<id<RCTBridgeModule>> *)modules
to
Code Block Objective-C
NSArray<Class> *)modules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With