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

InjectionX does not work on AppCode 2018.2.3 using XCode 10.0 #49

Closed
donirn opened this issue Sep 27, 2018 · 10 comments
Closed

InjectionX does not work on AppCode 2018.2.3 using XCode 10.0 #49

donirn opened this issue Sep 27, 2018 · 10 comments

Comments

@donirn
Copy link

donirn commented Sep 27, 2018

Hi, I am using AppCode 2018.2.3 to run my app. The XCode I'm using is version 10.0.
When I run it with XCode and a same configuration, it works fine. But, when I tried it on AppCode, it produced an error.

I'm already adding [[NSBundle bundleWithPath:@"/Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle"] load]; to my AppDelegate and turning off code coverage for the scheme.

But still I got an error:

*** Compiling /Users/doni.ramadhan/Projects/TheProject/Something.m ***
Loading .dylib - Ignore any duplicate class warning...
*** dlopen() error: dlopen(/Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval101.dylib, 2): Symbol not found: ___llvm_profile_runtime
  Referenced from: /Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval101.dylib
  Expected in: flat namespace
 in /Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval101.dylib ***
*** Compiling /Users/doni.ramadhan/Projects/TheProject/Something.m ***
Loading .dylib - Ignore any duplicate class warning...
*** dlopen() error: dlopen(/Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval102.dylib, 2): Symbol not found: ___llvm_profile_runtime
  Referenced from: /Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval102.dylib
  Expected in: flat namespace
 in /Users/doni.ramadhan/Library/Containers/com.johnholdsworth.InjectionX/Data/eval102.dylib ***

Can you help me on what I did wrong? Or maybe AppCode using XCode 10 is not supported yet?

@johnno1962
Copy link
Owner

johnno1962 commented Sep 27, 2018

Hi, this usually comes up when you have "gather coverage statistics" turned on in your scheme.

@donirn
Copy link
Author

donirn commented Sep 27, 2018

Yes, I already disabled that in my scheme. Specifically this line:
codeCoverageEnabled = "YES" in .xcscheme.

It is working on XCode 10, but not on my AppCode.

@donirn
Copy link
Author

donirn commented Oct 15, 2018

Hi, I'm raising this issue on AppCode forum. Since I'm suspecting AppCode uses something on LLVM that prevents injection app to use LLVM.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/205809099-Does-appCode-use-LLVM-?page=1#community_comment_360000171939

@zenangst
Copy link
Collaborator

zenangst commented Nov 6, 2018

@donirn hey mate, any news on this?

@donirn
Copy link
Author

donirn commented Nov 6, 2018

@zenangst There is no response from JetBrains.
I have created a new post there https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001481799-Does-AppCode-2018-2-4-use-LLVM-, perhaps they would answer if it is a new post.

Have you tested InjectionIII in AppCode?

@zenangst
Copy link
Collaborator

zenangst commented Nov 6, 2018

Nope not yet. But I have used Injection with other editors (other than Xcode), and that worked perfectly.

@yeswolf
Copy link
Contributor

yeswolf commented Oct 21, 2019

The main issue here is that AppCode uses a separate DerivedData in ~/Library/Preferences/AppCode(major).(minor). There is a reason for that: many users work with their project simultaneously in Xcode and AppCode, and there is a use-case when one wants to debug his application in AppCode and run tests in the Xcode at the same time (and many others).

I have a fix for this issue (by idenfifying IDE that is currently active), however I already see changes in master and quite a bit of changes in swift-conversion branch. So, I'm not sure, which branch to choose for PR. @zenangst Could you please suggest, which one to use?

@johnno1962
Copy link
Owner

Hi, Thanks for this! Please file your PR against the swift-conversion branch which will be the basis of the next release. AppCode should already work using Xcode’s DerivedData. You just need to be sure to build using Xcode each time you add a file to the project.

@yeswolf
Copy link
Contributor

yeswolf commented Oct 21, 2019

Hi, Thanks for this! Please file your PR against the swift-conversion branch which will be the basis of the next release.

Ok, will do.

@yeswolf
Copy link
Contributor

yeswolf commented Oct 22, 2019

Actually, after testing the swift-conversion branch I see that it works in AppCode, because some of modifications, like tracking not only "renamed" flag, are already implemented. As adding a file causes problems both for Xcode and AppCode and requires rebuilding the project, I think that most of use cases are already covered. Thank you, @johnno1962! In case of any further issues with AppCode - I'm ready to help.

zenangst pushed a commit that referenced this issue Mar 1, 2020
* Add AppCode support (fixes #147, #49)

* Minor change for Xcode 11.4 beta 1

Co-authored-by: yeswolf <yeswolf@gmail.com>
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

4 participants