Home  >  Article  >  Web Front-end  >  What to do if react native update fails

What to do if react native update fails

藏色散人
藏色散人Original
2023-01-09 10:41:071671browse

Solution to the failure of react native update: 1. Directly submit the IPA package to the App Store for review, and then upload the IPA package to the pushy platform; 2. Upload the archived IPA package to the pushy platform, and then upload the IPA package to the pushy platform. Submit it to iTunes connect; 3. Compile a release mode package to the mobile phone through Xcode, then use iTunes to export the IPA package, and then upload the IPA to the pushy platform.

What to do if react native update fails

The operating environment of this tutorial: Windows 10 system, react18.0.0 version, Dell G3 computer.

What should I do if the react native update fails?

react-native One of the problems that causes hot update failure

This article is a summary of my project. My project uses react-native- pushy. Assume that you already have an RN project, successfully configured the pushy service, and configured the hot-change code. If not, please refer to the documentation on react-native-pushy GitHub for configuration.

Problem

After the APP was recently revised, a new hot update package was installed, and then a crash occurred when using the old version of the APP to hot update. The debug error is as follows Unable to execute JS call: __fbBatchedBridge is undefined.

Error operation process

xcode changes the version to 1.0.0, then puts a release mode package on the phone, and then xcode archives a 1.0.0 ipa package Come out, push it to the hot update platform, and then use this base bag to hot update, and then it crashes.

Cause

By reproducing the problem multiple times, using debug mode to print out the error, and then checking the GitHub documentation, I found out that the cause was a problem with my operation process. Hot updates must ensure that the base package on the pushy platform and the app installed on the phone are the same. However, the package I installed on the phone using Xcode is referred to as A, and the package archived using Xcode is referred to as B. Although the codes of A and B are exactly the same and the version numbers are the same, they are already two packages, so the hot update fails.

Solution

  • Under normal circumstances, directly submit the IPA package to the App Store for review, and then upload the IPA package to the pushy platform. Users can Download this version of the package from the App Store and you can update it normally.

  • When testing, it is best to upload the archived IPA package to the pushy platform in conjunction with the Text File, and then submit the IPA package to iTunes connect. The tester downloads this version from the Text File. After the package is installed, you can hot update normally.

  • If your iTunes has not been upgraded, you can also compile a release mode package to your phone through Xcode, then use iTunes to export the IPA package, and then upload the IPA to the pushy platform, and it will work just as well. Normal hot update.

Summary

Anyway, it is to ensure that the base package of the pushy platform is consistent with the app installed on the mobile phone.

Recommended learning: "react video tutorial"

The above is the detailed content of What to do if react native update fails. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn