Closed haashem closed 8 years ago
Could be anything but probably to so with static variables which can confuse your code or possibly https://github.com/johnno1962/injectionforxcode/issues/35. You’re not adding ivars or anything?
I have used some static variables in the header file. do you think that would be because of that?
static const CGFloat kButtonMargin
adding static instant variable? no, no where
Where does it crash - or is it no particular place?
I have set breakpoint for all exception. but it crashes at the main.m file main method!
You’ll have to put in a whole bunch of NSLogs until you track it down I’m afraid. Do you think the injection completes and then it crashes somewhere else? Subscribe to notification @"INJECTION_BUNDLE_NOTIFICATION"
thanks for your quick response subscribing to that notification doesn't rise any event! I should partially track my code to find crash origin.
you can set issue as resolved!
Patch your project’s main.m (Project/Injection Plugin/Patch Project for Injection) and you should get better debugging info. Good Luck!
SOLVED!
praise god! you are a man that never give up!
thanks for your hint.
I was observing an object without unregistering it in dealloc method!
An instance 0x7faa69f78d40 of class FlexibleHeader was deallocated while key value observers were still registered with it.
Excellent!
my application crashes after swizzling code with no reason!
console log:
I deleted app from simulator but no success.
I tested with other apps. code injection works well for them!
do you have any idea?