This is an old revision of the document!
Darling has a stub generator that is capable of generating stubs for C and Objective-C frameworks and shared libraries. A computer running macOS is required to run the stub generator.
The stub generator assumes class-dump is located at ~/bin/class-dump
Copy/paste the following command into Terminal.
curl https://raw.githubusercontent.com/darlinghq/darling/master/tools/darling-stub-gen -o ~/bin/darling-stub-gen && chmod +x ~/bin/darling-stub-gen && echo "export PATH=\"~/bin:\$PATH\"" >> ~/.bash_profile && source ~/.bash_profile
To run the stub generator, structure your arguments like this:
darling-stub-gen /System/Library/Frameworks/DVDPlayback.framework/DVDPlayback DVDPlayback
The process is identical for dynamic libraries.
The above command will create a folder that can be placed in the /src directory of Darling's source tree. It is generated from the DVDPlayback framework. Note that the first argument points to the actual binary of the framework, not the root directory of the framework.
Once you have generated a stub source folder for the framework as the above command does for DVDPlayback, you can copy that folder into Darling's source tree under /src and submit a pull request containing your contribution.