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

Some swift files not injected in AppCode if they are not currently opened in Xcode #242

Open
eduardbosch opened this issue Apr 17, 2018 · 6 comments

Comments

@eduardbosch
Copy link

Hi,

I'm working in Xcode and with most of the files, it works really well.

With some swift files, it happens that they are not injected when I save them from AppCode if I haven't them opened in Xcode. So I have to save the file from AppCode and then go to Xcode, find the file, open it and automatically it gets injected as Xcode sees the changes I've made in AppCode.

Is there any process to say injection to look for all the files for changes? I have "File Watcher" enabled and works well with most of the files.

My project is currently configured as a framework library scheme and an app scheme that uses the framework library. I'm having trouble when I update files from both schemes, so I don't think is a problem with updating some code to a framework and som to the app code.

Thanks for this great tool. I hope that this has an easy fix that I'm missing ✌🏻

@johnno1962
Copy link
Owner

If some classes are injecting and others not it’s more of a Swifty problem like not being able to inject final methods, structs etc as they are direct dispatched i.e don’t go through the vtable which is what injection patches.

@eduardbosch
Copy link
Author

Well, the files are successfully injected if I have those files opened in Xcode.

For example, imagine I have two swift files A.swift and B.swift. If I have the file A.swift opened in Xcode and I save it from AppCode, it's correctly injected. But if I save the file B.swift in AppCode, the file is not injected until I open it in Xcode.

@johnno1962
Copy link
Owner

Sorry, led you astray there. This version of injection will inject the file currently open in Xcode using the AppleScript api. In theory AppCode will also work provided the injection app is in /Applications but I haven’t tested this in a while.

@eduardbosch
Copy link
Author

Will be great if it works in AppCode.

Is there anything I can do to test or check what may be happening?

@johnno1962
Copy link
Owner

You could try the new version “InjectionIII” which uses a file watcher from the injection home page while this will inject tests the TDD side isn’t implemented.

@eduardbosch
Copy link
Author

Thanks! This version injects any saved file from AppCode 🎉

I don't care about the TDD injection right now as it's not, but will be great also to support TDD injection with Quick.

Thanks again for this tool @johnno1962 👏🏻

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

2 participants