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

Swift dependency visualizer not working #68

Open
wds8807 opened this issue Dec 29, 2021 · 4 comments
Open

Swift dependency visualizer not working #68

wds8807 opened this issue Dec 29, 2021 · 4 comments

Comments

@wds8807
Copy link

wds8807 commented Dec 29, 2021

Xcode 13.1
Here is the result after running the line:
Screen Shot 2021-12-29 at 12 34 41 AM
First of all, it's a large project, it should be way more than 5 "directories".
Second of all, index.html is empty.
Please help.

@stateman92
Copy link

stateman92 commented Apr 16, 2022

I think it needs an older version of Xcode (if I remember correctly one year ago I managed to work with this tool) - I installed Xcode 12.0 but then it said that on my OS it cannot run (macOS 12.2.1). I cannot downgrade, so if anyone want to try it out, I would be grateful 🙏

@yermukhanbet
Copy link

Are there any plans for updating the project for Xcode 13.1 version availability?

@stateman92
Copy link

I managed to use Xcode 12.0 on macOS 12.2.1 (with this solution), and it worked so indeed the problem was that the Xcode 13.x is too new. (Then I just have to figure it out how to upgrade (downgrade?) my huge project to that Xcode 12.0 can build it.)

@stateman92
Copy link

stateman92 commented Apr 29, 2022

A (partial?) solution came sooner than I expected 🎉 with this type of command we can use a little workaround since it seems to me that this project is no more under maintenance.

  • Simply build your project (I used Xcode 13.3.1 but I strongly think that the object files' structures remain the same across releases),
  • reach out the DerivedData folder (which for me was /Users/<myName>/Library/Developer/Xcode/DerivedData), look for you project folder (something like <myProject>-randomcharacters - if you have so many folders that you cannot filter it out, you can delete all the content of the DerivedData folder - but in this case you have to build your project again),
  • inside this folder there will be a Build/Intermediates.noindex/<appName>.build/<schemeName>-<targetName>/<appName>.build/Objects-normal/x86_64 folder, which contains - possibly a lot of - .o files,
  • use the command I mentioned earlier (it should look something like this: ./generate-objc-dependencies-to-json.rb -d -p /Users/<myName>/Library/Developer/Xcode/DerivedData/<myProject>-randomcharacters/Build/Intermediates.noindex/<myProject>.build/<schemeName>-<targetName>/<myProject>.build/Objects-normal/x86_64 > origin.js ; open index.html),
  • the result is opened in a browser.

I will have to check how correct the results are, but for me (and for my use case) it seems legit.

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