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

projects containing Swift AND Objective-C? #42

Open
haemi opened this issue May 3, 2017 · 11 comments
Open

projects containing Swift AND Objective-C? #42

haemi opened this issue May 3, 2017 · 11 comments

Comments

@haemi
Copy link

haemi commented May 3, 2017

is it possible to generate a graph with both, Swift and Objective-C?

@PaulTaykalo
Copy link
Owner

It's not currenlty supported.

@alexwald
Copy link

alexwald commented Oct 2, 2017

any plans to support this? or at least have an option to exclude swift classes so the script would actually generate the map? I currently have only a few swift classes in a project and the .rb script generates an empty map.

@PaulTaykalo
Copy link
Owner

nope. it's not in the any nearest plans

@trupin
Copy link

trupin commented Oct 6, 2017

What do you think would be a good approach to do so?

@PaulTaykalo
Copy link
Owner

PaulTaykalo commented Oct 7, 2017

@trupin I think the easiest one will be just to generate deps by objc, then by swift and then merge json files with deps. I would start from this and see how it'll go. May be it wil be enough

@PaulTaykalo
Copy link
Owner

@trupin will actually need an example of the project, if you have something opensourced, not big one which can be used as a reference, it will be gr8

@trupin
Copy link

trupin commented Oct 12, 2017

@PaulTaykalo Unfortunately, I'm using your tool to analyze a project from work. Next time I need to analyze an open source project I'll ping you.

@PaulTaykalo
Copy link
Owner

@trupin yeah, sure.
You can still post images without the text with your comments, so I'll get idea so how it

  1. How does it work without additional flags? just -s <PROJECTNAME>
  2. How does it work with dwarf flag? -d -s <PROJECTNAME>
  3. How does it work with swift flag? -w -s <PROJECTNAME>

Also just be sure that this path is pointing to the correct project
image

@pidjay
Copy link

pidjay commented Oct 29, 2017

@PaulTaykalo I also have a project with both Swift and Objective-C, though it's mostly Swift.

To answer your questions, 1. and 3. would both output this line:

var dependencies = {"links":[],"links_count":0,"objects":{}}

with 1. also showing plenty of warning: The file was not recognized as a valid object file for all Swift files.

  1. would output a dependency graph with lots of "ClassName":{"type":"unknown"} and the index.html would look like this (red circles are Swift classes, the connected one are Obj-C):

screen shot 2017-10-29 at 13 43 24

Hope that can help you!

@Maryom
Copy link

Maryom commented Mar 6, 2018

@pidjay Hello,
I have same issues! Did you find a solution?

@lisional
Copy link

lisional commented May 4, 2018

I may be wrong about this but I just started experiencing with objc-dependency-visualizer this afternoon on a mixed project.
I went with the derived data path to generate the graph and it ran successfully, producing a map of all classes ObjC and Swift.

I think that both objc and swift file once compiled output .o files that can be interpreted by this tool in the same way. Not sure if output of this can be trusted yet (haven't dug this far yet) but it may represent something close to reality.

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

7 participants