Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode9.4.1,swift4.1, there is no effect #40

Closed
Chance-Cheng opened this issue Aug 23, 2018 · 4 comments
Closed

Xcode9.4.1,swift4.1, there is no effect #40

Chance-Cheng opened this issue Aug 23, 2018 · 4 comments

Comments

@Chance-Cheng
Copy link

Hello, I added the following code in the project
AppDelegate.swift
#if DEBUG
Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")?.load()
#endif
ViewController.swift
func injected() {
viewDidLoad()
}
Execute "CTRL" +"=" without any response. But I have no problem in the OC project. Could you give me some advice?

@johnno1962
Copy link
Owner

"CTRL" +”=“, was the old version of injection. With the App Store version you need only save the file if you have selected the correct project directory.

@zenangst
Copy link
Collaborator

@huayingxiong ohai, did you manage to get injection setup properly?

@zenangst
Copy link
Collaborator

zenangst commented Nov 7, 2018

Great news @huayingxiong, we have restored the injecting with ctrl+= functionality. It is currently on the master branch and not available in the Mac App Store yet but we are working on a version that we should be shipping very soon.

@zenangst
Copy link
Collaborator

@huayingxiong did you manage to get it working?

I see from your example that your injected method is missing @objc.
It needs to visible in Objective-C runtime for injection to pick up the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants