Skip to content

class-dump cannot find child class of a swift class defined in another module when BUILD_LIBRARY_FOR_DISTRIBUTION is on #662

Description

@yehe01

What happened?

I have an empty class

open class SwiftBaseVC:
}

defined in a CocoaPod module ExternalSwiftView.

And i define another child class which inherits SwiftBaseVC in another module ChildSwiftView:

public class SwiftChildVC2: SwiftBaseVC {
    
}

When i set all target BUILD_LIBRARY_FOR_DISTRIBUTION of all modules on and build.
class-dump can not output the info of the class SwiftChildVC2:

ipsw class-dump --arch arm64 --all --demangle -c SwiftChildVC2 TestIPSW

I also tried

ipsw swift-dump --demangle --arch arm64 -y SwiftChildVC2 TestIPSW

but got this:

class ChildSwiftView.SwiftChildVC2SwiftBaseVCExternalSwiftView.SwiftBaseVC {}

When i set BUILD_LIBRARY_FOR_DISTRIBUTION off, everything is fine.
The mach-o looks like this

Image

When BUILD_LIBRARY_FOR_DISTRIBUTION is on:
The mach-o looks liek this

Image

How can we reproduce this?

Use the project i uploaded, and build with BUILD_LIBRARY_FOR_DISTRIBUTION on for all of the pod targets.

ipsw version

3.1.560

Search

  • I did search for other open and closed issues before opening this

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

test_ipsw.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions