Xcode Archive build failed with react native project

隐身守侯 提交于 2019-12-01 18:52:17

Just updating the version of react-native is not enough when it comes to upgrading a react-native application. There are other changes to other files that must be made before the upgrade process is complete.

A good place to start is to look at the differences between the code in 0.57.8 and 0.58.5. You can find these changes by looking at the git diff on rn-diff-purge. If you look at the following link you will see that there are a lot more changes than just version of react-native.

https://github.com/pvinis/rn-diff-purge/compare/version/0.57.8...version/0.58.5

Alternatively you can use the community upgrade helper

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

This has the added benefit of including links to upgrade tutorials (for some versions) and links to the changelog

Some of these changes will be superfluous and may not actually affect the running on the application, other changes will be critical and must be done. Unfortunately the git diff doesn't tell us which we must do and which we can miss out it just tells us the differences. My advice would be to make all the changes that it suggests.

It can also be beneficial to look at vanilla versions of the app that you are starting from and then moving to. You can create a react-native app at a specific version using the following code:

react-native init newproject --version react-native@0.57.8

Between react-native 0.57.8 and 0.58.5 there is one big change that was added in the Xcode project is that you have to add JavaScriptCore.Framework to the Linked FrameWorks and Libraries

It can be tricky to figure that one out from the git diff above.

I saw that here someone expose an analogous question Undefined symbols for architecture arm64, maybe it can help you

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!