didi / didi/DoKit

Xcode设置Minimum Deployments iOS14 后运行加载分类时崩溃

Open
#1,165 0 comments 0 reactions 1 assignee Claimed by @jtsky View on GitHub
Dominant language
Java
Stars
20.4k
Forks
3.2k
Avg merge
1d 12h
Merged PRs (30d)
2

Description

> Xcode设置Minimum Deployments iOS13.6 运行正常

![image](https://github.com/didi/DoKit/assets/17783848/663c520f-b4f8-44f0-8797-a7f34b6a8368)

> Xcode设置Minimum Deployments iOS14 运行崩溃

![image](https://github.com/didi/DoKit/assets/17783848/0b06299c-e156-4531-b7e1-9ee780ecdfed)

目前发现问题在get_non_lazy_categary_list()中, 应该是苹果的category_t在iOS14后结构体有变化, 导致读取分类方法列表异常, 导致的崩溃;
category_t **get_non_lazy_categary_list(size_t *count) {
category_t **nlcatlist = NULL;
nlcatlist = _getObjc2NonlazyCategoryList((headerType *)get_target_image_header(), count);
return nlcatlist;
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.