Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native upgrade associated type errors

I upgraded react-native

"react": "16.9.0",
"react-native": "0.61.4",

to

"react": "16.11.0",
"react-native": "0.62.2",

I did ala everything react native upgrade helper documents

https://react-native-community.github.io/upgrade-helper/?from=0.61.4&to=0.62.2

but I encountered these errors

"associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType", referenced from:

"associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType", referenced from:

"value witness table for Builtin.Int32", referenced from:

enter image description here

like image 967
Ugur Avatar asked Jun 29 '20 09:06

Ugur


People also ask

Why upgrade to New React Native versions?

Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies. Upgrading requires a small amount of effort, but we try to make it straightforward for you.

Why does my React Native project keep crashing?

These sort of errors are usually related to caching, it's recommended to install react-native-clean-project to clear all your project's cache and then you can run it again.

Which APIs should I switch to support react 18?

To support React 18, some libraries may need to switch to one of the following APIs: useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches.

Why is react 18 not supported by Internet Explorer?

In this release, React is dropping support for Internet Explorer, which is going out of support on June 15, 2022. We’re making this change now because new features introduced in React 18 are built using modern browser features such as microtasks which cannot be adequately polyfilled in IE.


1 Answers

After upgrading to react-native 0.63.3 took the same error.

The root cause of this was my project only had objective-C files.

The solution is just to add an empty swift file under your project in xcode and all of your linking errors will be solved.

File -> New -> File

Select Swift File
like image 162
mr antoni Avatar answered Oct 17 '22 16:10

mr antoni