injectionforxcode
injectionforxcode copied to clipboard
EXC_BAD_ACCESS in my app
I just add method
- (void)injected { NSLog(@"I've been injected: %@", self); } in my any class. then it crash in if ( [subObject respondsToSelector:@selector(bsweep)] )
and showing EXC_BAD_ACCESS;
my viewcontroller is build for xib.
please help ~
The -injected method is the soft underbelly of injection, particularly so for swift, as it has to “sweep” all instances in your app to find the instances of the injecting class. There must be an instance variable it is mistaking for an object. There are only two ways to debug this. If it is posibble can you send the project through to [email protected] or we can TeamView to track this down as it may be affecting othe people. Is this Xcode 7.2.1 or 7.3b*?
It is Xcode 7.2.1 . And maybe we can TeamView to track this down. How can I
Do you have TeamViewer app? http://www.teamviewer.com/en/
yes and where I send the id and password for you ?
injection at johnholdsworth.com
ok
I have already sent , do you receive it ?
Could this be to do with using “-injected” with non-ARC code?
Unfortunately, until now I can't run it with -injected 。I desire to use 。。。 but。。。
Is there any method to fix my problem?
Without ARC you can only use the “INJECTION_BUNDLE_NOTIFICATION” notification.
[[NSNotificationCenter defaultCenter] postNotificationName:@"INJECTION_BUNDLE_NOTIFICATION" object:nil];
I also can't injection 😭
Eh? Injection posts the notification, you shouldn’t be posting it. Have a carefuly look at orta’s original video about injection here: http://artsy.github.io/blog/2016/03/05/iOS-Code-Injection/