https://github.com/xing/pandan
Retrieve Xcode dependency information with ease
https://github.com/xing/pandan
dependencies graphviz xcode
Last synced: 11 months ago
JSON representation
Retrieve Xcode dependency information with ease
- Host: GitHub
- URL: https://github.com/xing/pandan
- Owner: xing
- License: mit
- Created: 2017-03-23T15:46:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T07:49:25.000Z (almost 6 years ago)
- Last Synced: 2025-04-28T03:46:58.171Z (11 months ago)
- Topics: dependencies, graphviz, xcode
- Language: Ruby
- Size: 378 KB
- Stars: 23
- Watchers: 11
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Pandan
[](https://travis-ci.org/xing/pandan)
[](http://badge.fury.io/rb/pandan)
> Pandanus amaryllifolius is a tropical plant in the Pandanus (screwpine) genus, which is commonly known as pandan leaves, and is used widely in South Asian and Southeast Asian cooking as a flavoring.
> —[Wikipedia](https://en.wikipedia.org/wiki/Pandanus_amaryllifolius)
`pandan` is a CLI tool that outputs dependency information from a set of Xcode projects with targets that depend on each other, it does it by creating a (reverse) dependency graph using the information in "Link Binary with Libraries" build phase and doing a breadth-first search.
## Installation
`pandan` is distributed as a Ruby gem and can be installed using the following command:
```bash
$ gem install pandan
```
## Motivation
At XING, CocoaPods helped us manage our Objective-C and Swift dependencies for a long time. But as our team grew, it was evident to us that CocoaPods was not the tool we needed anymore. We decided to migrate all our projects to a different setup that uses multiple Xcode projects, targets and xcconfig files under a single workspace. However, we were lacking a tool that would give us dependency information based one the settings already in place in Xcode.
## Usage
Given the following project setup:

where additionally to this, SampleFrameworkD links against SampleFrameworkE:
```bash
$ pandan query SampleFrameworkB # will output:
SampleFrameworkC
SampleFrameworkE
SampleFrameworkD
```
You can generate a complete dependency graph of your workspace that is output as a PNG image. It's a good idea to exclude targets with names ending in "Tests" for a more tidy graph:
```bash
$ pandan dependency-graph --image --filter='^(?!.*Tests$).*$'
```

For a complete and up-to-date usage description, execute:
```bash
$ pandan --help
```