feature: Weex APM && SwiftUI

This commit is contained in:
FantasticLBP
2026-01-11 00:09:24 +08:00
parent 7843661458
commit ddfbd0bc29
8 changed files with 66 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
# 剖析 Swift String
# 剖析 Swift String
带着问题研究下 Swift 中的 String

View File

@@ -1,4 +1,4 @@
# 内存管理
# Swift 内存管理
## 弱引用

View File

@@ -1,6 +1,12 @@
# Weex 底层原理与 APM
> 从 Vue 组件库Vue Lib到 Weex 渲染为 iOS 原生 UIKit 元素,核心是 “Virtual DOM → 跨线程通信 → Native DOM 构建 → 布局计算 → 原生 View 渲染 → 事件反向绑定” 的完整链路。Weex 作为中间层,主要完成 7 大核心工作,接下去看看详细内容
> 从 Vue 组件库Vue Lib到 Weex 渲染为 iOS 原生 UIKit 元素,核心是 “Virtual DOM → 跨线程通信 → Native DOM 构建 → 布局计算 → 原生 View 渲染 → 事件反向绑定” 的完整链路。Weex 作为中间层,主要完成 7 大核心工作
>
> Weex 是诸多年前的产物,部分业务线用 Weex 写了部分功能模块,或者是某几个页面,或者是某个二级、三级业务 SDK 的页面。但可以确定的是:新业务的实现只会在 Native 和 Flutter 上考虑Weex 业务代码基本上是存量的;所以像 Native 一样去全面监控性能、网络、crash、异常、白屏、页面加载耗时等维度的话ROI 是很低的。那么就需要制定一些策略去有针对性的监控高优问题。这时候就需要摒弃程序员视角(不然会陷入啥数据都想统计,可能是洁癖、可能是追求),但从 ROI 角度出发,我们就需要切换到用户视角。
>
> 按照异常等级,可以划分为影响业务和不影响业务。什么叫“影响业务”?这是我们自己定义的标准,影响用户是否正常操作 App。比如页面白屏页面全部白屏、页面部分白屏、点击某个按钮无响应这些叫做“影响业务”属于 Error 级别。其他的一些轻微异常,不影响用户使用 App 功能,不影响业务,属于 Warning 级别。
>
> 关于异常的一些北极星指标的定义,以及 Weex 侧的稳定性与异常监控怎么做?请带着问题看文章
## 一、核心步骤
@@ -1166,7 +1172,7 @@ Weex 的 JSBundle 仅包含业务逻辑和组件描述框架代码Vue 内
Weex 是诸多年前的产物,部分业务线用 Weex 写了部分功能模块,或者是某几个页面,或者是某个二级、三级业务 SDK 的页面。但可以确定的是:
- 21年就完成了 Flutter 的基建开发(对齐 Native 的 UI 组件库,遵循体验设计平台产出的集团 UI 标准;做了 Flutter 的大量 plugin、打包构建平台、日志库、网络库、探照灯、APM SDK、热修复能力等。新业务的实现只会在 Native 和 Flutter 上考虑
- Weex 业务代码基本上是存量的
- Weex 代码没有 bug 就不去修改;有版本迭代,之前是 Weex 实现的,本次只做简单 UI 增删或字段调整,也是会修改一下。初次之外不修改 Weex 代码
- Weex 代码没有 bug 就不去修改;有版本迭代,之前是 Weex 实现的,本次只做简单 UI 增删或字段调整,也是会修改一下。除此之外不修改 Weex 代码
所以像 Native 一样去全面监控性能、网络、crash、异常、白屏、页面加载耗时等维度的话ROI 是很低的。那么就需要制定一些策略去有针对性的监控高优问题。

View File

@@ -1,4 +1,4 @@
# 安全气垫
# 移动端的“安全气垫
> 安全气垫是端上一个老生常谈的话题,技术方案已经是好多年前的产物。唯一的问题是不同公司对于安全气垫在拦截到异常的时候,“做与不做”策略的判断不同。比如数组索引越界的时候要返回一个错误位置的值吗?会不会产生业务异常?要一刀切吗?那么本文就尝试回答下这个问题

View File

@@ -117,4 +117,21 @@
* [111、写给 iOSer 的鸿蒙开发 tips](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.111.md)
* [112、Swift 枚举值内存布局](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.112.md)
* [113、Swift 结构体和类的内存布局](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.113.md)
* [114、Swift 优化](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.114.md)
* [114、Swift 优化](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.114.md)
* [115、AI 对端上的赋能](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.115.md)
* [116、Swift 类底层剖析](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.116.md)
* [117、Swift 协议探究](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.117.md)
* [118、Swift 错误处理](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.118.md)
* [119、剖析 Swift String](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.119.md)
* [120、Swift 访问控制](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.120.md)
* [121、Swift 内存管理](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.121.md)
* [122、Swift 字面量本质](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.122.md)
* [123、Swift 模式匹配](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.123.md)
* [128、SwiftUI 研究](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.128.md)
* [139. 图形渲染技巧](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.139.md)
* [140. Aspects](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.140.md)
* [143. AI 对端上的赋能](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.143.md)
* [146. Weex 底层原理与 APM](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.146.md)
* [147. Rust 在移动端可以做什么](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.147.md)
* [148. 移动端的“安全气垫”](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter1%20-%20iOS/1.148.md)