Git Product home page Git Product logo

Comments (6)

287291867 avatar 287291867 commented on June 11, 2024

xcode9上运行,也没用了,越界也检测不到了,怎么解决

from avoidcrash.

287291867 avatar 287291867 commented on June 11, 2024

iOS 11可变数组失效,你可以这样改下试试,iOS 11以前方法是[__NSArrayM objectAtIndex:],iOS 11以后方法是[__NSArrayM objectAtIndexedSubscript:],所以把NSMutableArray+AvoidCrash.m文件中的24行代码中的objectAtIndex方法替换成objectAtIndexedSubscript

from avoidcrash.

zhugongyuan avatar zhugongyuan commented on June 11, 2024

从哪里可以查到[__NSArrayM objectAtIndex:]失效了,我看官方文档objectAtIndexedSubscript是ios6.0 都可以使用的啊 @287291867

from avoidcrash.

wen644 avatar wen644 commented on June 11, 2024

arrary[i]这样取对象,iOS 11以前方法是[__NSArrayM objectAtIndex:],iOS 11以后方法是[__NSArrayM objectAtIndexedSubscript:],麻烦作者加上[__NSArrayI objectAtIndexedSubscript:]

from avoidcrash.

Wuou avatar Wuou commented on June 11, 2024

希望可以解决你的问题
/* 数组count >= 2 */
[self wo_instanceSwizzleMethodWithClass:__NSArrayI orginalMethod:@selector(objectAtIndex:) replaceMethod:@selector(wo_objectAtIndex:)];//[arr objectAtIndex:];

        [self wo_instanceSwizzleMethodWithClass:__NSArrayI orginalMethod:@selector(objectAtIndexedSubscript:) replaceMethod:@selector(wo_objectAtIndexedSubscript:)];//arr[];

from avoidcrash.

chenfanfang avatar chenfanfang commented on June 11, 2024

已更新 兼容 iOS11 pod 2.5.1

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.