johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 566 forks source link

BundleSweeper causing crash #231

Open PrideChung opened 6 years ago

PrideChung commented 6 years ago

Hi,

This tool is such a brilliant idea, thank you for your hard work.

My project encountered a special crash case while performing injection, looks like some methods of 3rd party library are being called by bundle sweeper from an undesired thread and triggered an assertion.

2017-10-28 5 14 51

My question is if there anyway to disable bundle sweeper for a specified class?

johnno1962 commented 6 years ago

Hi, no way at the moment I’m afraid. The sweeper is used to implement the -injected functionality the alternative is to use “INJECTION_BUNDLE_NOTIFICATION” when you have this problem see: https://github.com/johnno1962/injectionforxcode/issues/226