Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6379025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:05:07+00:00 2026-05-25T02:05:07+00:00

This guy came up with a pretty neat tool to generate a class dependency

  • 0

This guy came up with a pretty neat tool to generate a class dependency graph – however, it relies on parsing your source code and looking for #import directives.

  • http://seriot.ch/blog.php?article=20110124
  • https://github.com/nst/objc_dep/blob/master/objc-dep.py

This is neat, but I have a number of problems with this. Not least of which is it doesn’t take into account imports of imports nor prefix headers nor whether-or-not the class(es) in the file referenced by the import are actually being used.

I’d like to do something more akin to class-dump and examine the Objective-C metadata stored in the Mach-O file to generate an in-memory representation of the class dependencies.

I’d rather not do this from scratch, so I’m wondering:

  • Has it already been done?
  • Is there an open-source library which would provide me with the foundational tools I need to extract this information (a library which examines the Mach-O file and creates a façade of the Objective-C information contained within – such that I could iterate over all of the classes, their methods, properties, ivars, etc and scan for references to other classes) I figure class-dump’s source would be a good place to start.
  • If you have experience in this sort of thing, is what I’m trying to accomplish feasible?
  • What roadblocks will I need to overcome?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:05:07+00:00Added an answer on May 25, 2026 at 2:05 am

    Has it already been done?

    Not that I know of.

    Is there an open-source library which would provide me with the
    foundational tools I need to extract this information?

    At the core of class-dump is libMachObjC which does exatly what you want, i.e. parse all classes/methods/ivars and more. The API is very clean, it should be very easy to use.

    If you have experience in this sort of thing, is what I’m trying to
    accomplish feasible?

    Unfortunately, no because some classes don’t declare the real class but use id instead. For example, here is the information that can be extracted from a class-dump of UIKit:

    @interface UITableView : UIScrollView <NSCoding>
    {
        int _style;
        id <UITableViewDataSource> _dataSource;
        id _rowData;
        ...
    

    The _rowData ivar type information is id but if you check at runtime you will see that _rowData is an instance of the UITableViewRowData class. This information is not present in the Mach-O binary so you have no way to find the relation between UITableView and UITableViewRowData. The same applies for method parameters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am checking this guy's code... http://www.codingcolor.com/as3/as3-youtube-chromless-api/ I have download the source code...but I
ive a similar problem as this guy: Generate SQL CE database from EF Code-First
Um, I have this guy: <div class=buttonRight><asp:Button ID=btnOK runat=server Text=OK Width=68px/></div> which renders out
Just came across this guy that left me stunned: gcc -E -dM - </dev/null
I am creating a tool which relies heavily on graph-node trees. The current implementation
I have the same problems as this guy . However I will say that
So yeah, I'm a Java guy in this crazy iPhone world. When it comes
This question is language agnostic but I am a C# guy so I use
This is a Windows Console application (actually a service) that a previous guy built
This is a nasty one for me... I'm a PHP guy working in Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.