Skip to main content

XCode Project manipulation library for Python

Project description

GitHub Workflow Status (branch) Codacy branch coverage Codacy grade PyPI PyPI - Downloads 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:

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.

Installation

For installation instructions visit the wiki

CLI

For instructions and commands available visit the wiki

Documentation

For general documentation, visit the 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:

  • Check you are running python3 and installed the package using the pip3 command.

  • 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-3.3.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

pbxproj-3.3.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pbxproj-3.3.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pbxproj-3.3.0.tar.gz
Algorithm Hash digest
SHA256 23ea590b006316aa5bc11208088e6df7138bbe1127bc9d570baa15bc5bef6ed8
MD5 c284d5368ccc219a9151bf00839f3d04
BLAKE2b-256 bb694fdb6e80318c42c4d208de5ec3340f9fb0adb493b2691e7a208197713d50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pbxproj-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pbxproj-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37e582dee7f9c9e4a66c3a19b307ef5d2ca8948e683f53751771275b75e76cc2
MD5 6d0bfdb5b4d59b2bda43e1b7e0d04482
BLAKE2b-256 6658cd17f639a6fd2f726ca52f1156702a90dcf8664d789baf84dea15c64f0e7

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