Giter Club home page Giter Club logo

Comments (3)

chenfanfang avatar chenfanfang commented on August 20, 2024

你好,PrefixsArr数组里放了哪些字符串,麻烦贴出你的代码。
由于自带类的某些少数方法的调用是通过最后的转发补救的,所以AvoidCrash有时候会拦截了系统的默认做法,会导致误伤,所以可能会导致你所说的情况。你可以参考下面的链接。

#40

同时,请贴出你的代码,给大家借鉴一下哪些情况会出现这样的问题,也方便AvoidCrash进行改进,谢谢

from avoidcrash.

hj4859199 avatar hj4859199 commented on August 20, 2024

下面是我在AppDelegate调用的方法
NSArray *noneSelClassPrefix = @[
@"IM",
@"Project",
@"Attend",
@"Report",
@"Labor",
@"Quality",
@"Contract",
@"Bill"
];
[AvoidCrash setupNoneSelClassStringPrefixsArr:noneSelClassPrefix];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dealwithCrashMessage:) name:AvoidCrashNotification object:nil];

其中Attend对应的AttendanceSignInVC和AttendanceLocusDetailVC的两个类,
Project对应的ProjectHomePageViewController类运行就会闪退,出现EXC_BREAKPOINT错误

from avoidcrash.

chenfanfang avatar chenfanfang commented on August 20, 2024

@hj4859199 抱歉,目前AvoidCrash对 “unrecognized selector sent to instance”的兼容并不是非常完善,建议不要填入 UIKit中的类或者子类,也不要加入NSObject(可以加入继承于NSObject的子类)。

unrecognized selector sent to instance 一般用来对数据的处理比较多,建议直接使用如下代码(只针对数据的处理)

NSArray *noneSelClassStrings = @[
@"NSNull",
@"NSNumber",
@"NSString",
@"NSDictionary",
@"NSArray"
];
[AvoidCrash setupNoneSelClassStringsArr:noneSelClassStrings];

对于AvoidCrash给你带来的困扰,在此表示抱歉。

from avoidcrash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.