The packing procedure is as follows: 1. Open the Terminal -> CD project directory 2. Project root directory /ios/ Manually creating (bundle) files 3. Run the following command on the terminal:
(index. The ios. Jsbundle can modify) the react - native bundles - entry - file index. The js - bundle - output. / ios/bundle/index. The ios. Jsbundle - platform ios - assets - dest. / ios/bundle - dev false reference address: https://www.jianshu.com/p/5a71437c3678 after the completion of the following figure:Copy the code
#if DEBUG jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else jsCodeLocation = [NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"index.ios.jsbundle" ofType:nil]]; #endifCopy the code
6. Select Xcode to set navigation and configure the certificate. As shown in figure:
www.jb51.net/article/101…
Pay attention to
Build Select debug/ Release version for test package when selecting Edit Scheme
Problems encountered: 1.
Xcode->file->WorkSpace Settings… In the dialog box that is displayed, select Legacy Build System and then Done
2.
Release the test package, the official package, and just change the certificate.