{"id":18746691,"url":"https://github.com/matrixeditor/umbrella","last_synced_at":"2025-06-22T19:33:01.449Z","repository":{"id":270149857,"uuid":"729844995","full_name":"MatrixEditor/umbrella","owner":"MatrixEditor","description":"Python library to inspect Objective-C binaries (extract and dump classes). See umbrellaPY for a pure Python implementation.","archived":false,"fork":false,"pushed_at":"2023-12-10T14:35:50.000Z","size":72,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-28T20:45:59.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatrixEditor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-10T14:35:48.000Z","updated_at":"2024-10-21T06:15:19.000Z","dependencies_parsed_at":"2024-12-28T20:46:01.336Z","dependency_job_id":"cd392493-9710-49f6-9d21-da443662f163","html_url":"https://github.com/MatrixEditor/umbrella","commit_stats":null,"previous_names":["matrixeditor/umbrella"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixEditor%2Fumbrella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixEditor%2Fumbrella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixEditor%2Fumbrella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixEditor%2Fumbrella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixEditor","download_url":"https://codeload.github.com/MatrixEditor/umbrella/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239629210,"owners_count":19671237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class-dump","objective-c","reverse-engineering"],"created_at":"2024-11-07T16:26:32.718Z","updated_at":"2025-02-19T09:25:55.296Z","avatar_url":"https://github.com/MatrixEditor.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umbrellacxx\n\nA compact Python library, written in C++, designed for inspecting static Objective-C runtime information.\n\n\u003e **Note**: This package is not currently available via PyPI; you will need to compile and install it manually using the installation steps provided below.\n\nA pure Python implementation that supports both Objective-C and Swift metadata, please visit [umbrella-py](https://github.com/MatrixEditor/umbrella-py) (this package also has an installation candidate).\n\n## Principles\n\nThis small and efficient Python package enables you to inspect Mach-O binaries that store Objective-C runtime information. It supports the following use cases:\n\n- Examining the static runtime information of Objective-C binaries. This includes a detailed recreation of Objective-C header files storing classes, extensions, categories, and protocols.\n- A complete and reliable Objective-C type decoder with support for properties, method signatures, and default types.\n\n## Usage\n\nBelow is a small collection of use-cases for this library:\n```python\nimport umbrellacxx\n\n# 1. Parse the binary file\nmetadata = umbrellacxx.objc.parse(\"/path/to/binary\")\n\n# Dump all class declarations (same with protocols and categories)\nfor objc_class in metadata.classes:\n    print(objc_class.get_decl())\n\n# Get a protocol by its name\nprotocol = metadata.get_protocol(\"Foo\")\n\n# Decode an Objective-C encoded type description\ndesc = umbrellacxx.objc.typedesc('T@\"NSArray\",\u0026,N,V_foo')\nprint(umbrellacxx.objc.decode(desc))\n# prints '@property (retain, nonatomic, ) NSArray foo'\n\n# Decode a method's signature\nsig = umbrellacxx.objc.signature(\"foo:bar:\", \"q24@0:8@16\")\nprint(sig) # '(double)foo:(id) bar:(id)'\n```\nFor more detailed information about the structure of each Python class, please refer to [objc.pyi](/bindings/python/umbrellacxx/objc.pyi).\n\n## Installation\n\nTo install the Python package you need a nanobind-compatible compiler architecture, CMake and LIEF to be\ninstalled. The complete setup is listed below:\n\n1. Clone the repository\n\n    ```console\n    git clone https://github.com/MatrixEditor/umbrella.git \u0026\u0026 cd umbrella\n    ```\n\n2. Setup all relevant files using CMake. This step is necessary to check whether all components are installed\n   correctly:\n\n    ```console\n    cmake -S . -B build\n    ```\n\n3. We use pip to install the python library:\n\n    ```console\n    cd bindings/python \u0026\u0026 pip install .\n    ```\n\n4. Done! You now should be able to import the python package:\n\n    ```python\n    \u003e\u003e\u003e import umbrellacxx\n    \u003e\u003e\u003e metadata = umbrellacxx.objc.parse(\"/path/to/binary\")\n    \u003e\u003e\u003e cls = metadata.classes[0]\n    \u003e\u003e\u003e print(cls.get_decl())\n    \"\"\"\n    @interface DebugSettingsViewController: AdvancedSettingsViewController\n    // methods\n    - (void)viewDidLoad // 0x100006fc4\n    - (id)createSettingsForUser:(id) // 0x100007140\n    @end\n    \"\"\"\n    ```\n\n### Building the documentation\n\nIn order to build the documentation locally, Doxygen must be installed. **(Make sure to setup the project using CMake before running Doxygen)**:\n\n1. Setup and build documentation:\n\n    ```console\n    cmake -S . -B build \u0026\u0026 doxygen DoxyFile\n    ```\n\n## License\n\nDistributed under the Apache 2.0 License. See LICENSE for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixeditor%2Fumbrella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixeditor%2Fumbrella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixeditor%2Fumbrella/lists"}