johnno1962 / injectionforxcode

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

EXC_BAD_ACCESS in my app #78

Open vbonluk opened 8 years ago

vbonluk commented 8 years ago

I just add method

and showing EXC_BAD_ACCESS;

my viewcontroller is build for xib.

please help ~

johnno1962 commented 8 years ago

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 injection@johnholdsworth.com or we can TeamView to track this down as it may be affecting othe people. Is this Xcode 7.2.1 or 7.3b*?

vbonluk commented 8 years ago

It is Xcode 7.2.1 . And maybe we can TeamView to track this down. How can I

johnno1962 commented 8 years ago

Do you have TeamViewer app? http://www.teamviewer.com/en/

vbonluk commented 8 years ago

yes and where I send the id and password for you ?

johnno1962 commented 8 years ago

injection at johnholdsworth.com

vbonluk commented 8 years ago

ok

vbonluk commented 8 years ago

I have already sent , do you receive it ?

johnno1962 commented 8 years ago

Could this be to do with using “-injected” with non-ARC code?

vbonluk commented 8 years ago

Unfortunately, until now I can't run it with -injected 。I desire to use 。。。 but。。。

vbonluk commented 8 years ago

Is there any method to fix my problem?

johnno1962 commented 8 years ago

Without ARC you can only use the “INJECTION_BUNDLE_NOTIFICATION” notification.

vbonluk commented 8 years ago

[[NSNotificationCenter defaultCenter] postNotificationName:@"INJECTION_BUNDLE_NOTIFICATION" object:nil];

I also can't injection 😭

johnno1962 commented 8 years ago

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/