react-native ios打包

打包

Steps to release ipa file for react native

==========================================

## 1. Clear caches of react.

> rm -rf $TMPDIR/react-*

## 2. Delete existed bundle file.(如果之前已经有了main.jsbundle,会删除掉,之前没有,会显示找不到)

> rm ios/main.jsbundle

## 3. Bundle main.jsbundle.

> react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle

## 4. Release ipa file in xcode.

a) Open AppDelegate.m

注释掉: jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

打开:   jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

c) The JS bundle will be built for dev or prod depending on your app's scheme (Debug = development build with warnings, Release = minified prod build with perf optimizations). To change the scheme navigate to Product > Scheme > Edit Scheme... in xcode and change Build Configuration between Debug and Release.

d) Confirm the 'Code Signing' settings.

e) Run Product > Archive.

IPA加密

==========================================

步骤一:使用Xcode打开项目

步骤二:Build Settings --> PROJECT --> Other C Flags --> Other C++ --> 添加以下编译选项

-mllvm -cxf -mllvm -equ -mllvm -fcf -mllvm -chenxify-prob=10 -mllvm -falsify-loop=2 -mllvm -falsify-prob=10”

步骤三:Build Settings --> TARGETS --> 将所有Enable Bitcode选项设为No

(注意: 本步骤仅针对Xcode7.0及7.0以上版本,其他版本不需要)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容