react-native 热更新

查看appkey:code-push deployment ls updateApp -k
ios 链接原生(rn 60以后 不需要link原生,但是可能有的包需要add进项目)
https://reactnative.cn/docs/linking-libraries-ios

1.ios init 新的项目后 要用 xcode 打开ios文件 点击三角运行到手机上(切换wife 也要重新用xcode
build)
Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange
brew update
brew install watchman
brew 安装参考:https://zhuanlan.zhihu.com/p/90508170
例:/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

2.codepush 使用
https://www.jianshu.com/p/cd7576af381f
问题:出现npm i rn-code-push 后跑不起来,然后进入ios pod install 然后 关掉控制台重star
最后 注释掉 rn-code-push 可以跑了,但是报错一直都是其他包解析不了
60以上不需要执行link操作 (直接pod update)

image.png

出现以上情况 ,去掉之前误加的link
image.png

3 配置key code-push app add updateApp2 ios react-native
添加成功:
Successfully added the "updateApp2" app, along with the following default deployments:
┌────────────┬───────────────────────────────────────┐
│ Name │ Deployment Key │
├────────────┼───────────────────────────────────────┤
│ Production │ ndLpRNlNU4poPpkjPqzHkGDmepZGZw1pXvi2B@@ │
├────────────┼───────────────────────────────────────┤
│ Staging │ xaxjUnSF8lLQ0nP90GiQ4rkz_jzP_TiVDTXkk@@ │

ios xcode 配置参考:
https://www.jianshu.com/p/cd7576af381f

4.codepush 开发模式下如何触发ios更新
a.修改xcode 1.3.0
b.发布staging:
code-push release-react updateApp2 ios --plistFile ../updateApp2/Info.plist -t "1.3.0" --des "测"
c.xocde重新build 打开项目

code-push release-react yhapp ios --t 1.6.9 --dev false --d Production --des "这是第一个更新包" --m true

code-push release-react yhapp ios --t 1.6.7 --dev false --d Production --des "这是第一个更新包" --m true

@@@
注意:等保维护后提交版本后的codepush(app store新版本号1.6.8)
对应key: "qRAAF1jT1KWYabdpkPGHeBCLfFa4YiSwiSOsy"
code-push release-react yhapp ios --t 1.6.8 --dev false --d Production
appstore 刚下载后可以更新,调试阶段暂时无法更新
@@@
code-push release-react awesomeproject android --t 1.0.0 --des "这是第一个更新包"

特别文档
https://www.jianshu.com/p/7d44c244ac5c?utm_source=oschina-app

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

友情链接更多精彩内容