Skip to main content

XCode Project manipulation library for Python

Project description

.. image:: https://img.shields.io/github/workflow/status/kronenthaler/mod-pbxproj/branch-check/master?logo=github&style=flat-square :target: https://github.com/kronenthaler/mod-pbxproj/actions?query=workflow%3Abranch-check :alt: GitHub Workflow Status (branch)

.. image:: https://img.shields.io/codacy/coverage/70c14211ba704d2893f7b0f54bb04da7/master?logo=codacy&style=flat-square
:alt: Codacy branch coverage :target: https://www.codacy.com/app/kronenthaler/pbxproj?utm_source=github.com&utm_medium=referral&utm_content=kronenthaler/pbxproj&utm_campaign=badger

.. image:: https://img.shields.io/codacy/grade/70c14211ba704d2893f7b0f54bb04da7?logo=codacy&style=flat-square :target: https://www.codacy.com/app/kronenthaler/pbxproj?utm_source=github.com&utm_medium=referral&utm_content=kronenthaler/pbxproj&utm_campaign=badger :alt: Codacy grade

.. image:: https://img.shields.io/pypi/v/pbxproj?color=97cb02&logo=python&logoColor=ffffff&style=flat-square :target: https://pypi-hypernode.com/pypi/pbxproj :alt: PyPI

.. image:: https://img.shields.io/pypi/dm/pbxproj?color=97cb02&logo=python&logoColor=ffffff&style=flat-square :target: https://pypi-hypernode.com/pypi/pbxproj/ :alt: PyPI - Downloads

.. image:: https://img.shields.io/pypi/l/pbxproj?color=97cb02&style=flat-square :target: license.txt :alt: PyPI - License

pbxproj

This module can read, modify, and write a .pbxproj file from an Xcode 4+ projects. The file is usually called project.pbxproj and can be found inside the .xcodeproj bundle. Because some task cannot be done by clicking on an UI or opening Xcode to do it for you, this python module lets you automate the modification process.

How to use it

The typical tasks with an Xcode project are adding files to the project and setting some standard compilation flags. It can be achieved with a simple snippet like this:

.. code-block::

from pbxproj import XcodeProject

open the project

project = XcodeProject.load('myapp.xcodeproj/project.pbxproj')

add a file to it, force=false to not add it if it's already in the project

project.add_file('MyClass.swift', force=False)

set a Other Linker Flags

project.add_other_ldflags('-ObjC')

save the project, otherwise your changes won't be picked up by Xcode

project.save()

That's it. More details about available API's visit the wiki <https://github.com/kronenthaler/mod-pbxproj/wiki/>__.

Installation

For installation instructions visit the wiki <https://github.com/kronenthaler/mod-pbxproj/wiki/Installation>__

CLI

For instructions and commands available visit the wiki <https://github.com/kronenthaler/mod-pbxproj/wiki/CLI>__

Documentation

For general documentation, visit the wiki <https://github.com/kronenthaler/mod-pbxproj/wiki/>_. For technical documentation, the public functions are documented and contains details about what is expected.

Reporting bugs

Did you find a bug? Too bad, but we want to help you, we need you to:

  • Provide as many details about the error you are having.
  • If possible provide a sample project.pbxproj to reproduce the steps
  • If possible, try the sequence of steps on Xcode and provide the project.pbxproj generated by Xcode.

We cannot help you if your issue is a title: "it does not work". Or if there is no sequence of steps to reproduce the error. Those kind of issues will be ignored or closed automatically.

Contributing

Do you want to fix an issue yourself? Great! some house rules:

  • Provide a description of what problem you are solving, what case was not being taking into account
  • Provide unit tests for the case you have fixed. Pull request without unit test or PRs that decrease the coverage will not be approved until this changes.
  • Adhere to the coding style and conventions of the project, for instance, target_name is used to specify the target across all functions that use this parameter. Changes will be requested on PRs that don't follow this.
  • Write descriptive commit messages.

License

This project is licensed using MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pbxproj-2.11.0.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

pbxproj-2.11.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file pbxproj-2.11.0.tar.gz.

File metadata

  • Download URL: pbxproj-2.11.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pbxproj-2.11.0.tar.gz
Algorithm Hash digest
SHA256 cab3cfc66a3e5bd620ce7bb29ac96bf1a51dc39b6833c588e1c002199bdcee7b
MD5 3b73bcf302b8de4f20354f08a812e642
BLAKE2b-256 0b2bd04a4f071fe9128bc2e5ee5e6a4b0f7f1b0a7ba9d529395f3a1b8c186fb9

See more details on using hashes here.

File details

Details for the file pbxproj-2.11.0-py3-none-any.whl.

File metadata

  • Download URL: pbxproj-2.11.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pbxproj-2.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b0a2c74567d7c0fa58de4dbf46eb250313b8729fae26fd23b8f5bd7fec6b049
MD5 15c50a0fe2fe3250bbdfa2782aff2bf1
BLAKE2b-256 97bcce3423355aa31aba1761d2cc09f7095a08613945aba4b9b0f6ce2b93fbd8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page