Skip to content

Import module

kronenthaler edited this page Dec 17, 2016 · 4 revisions

There are 2 ways to import this python module. Originally this project was a single file monolithic file, which was particularly handy to include in Unity3d projects. However, codewise, the implementation was not maintainable.

After version 2.0.0, the code was refactored and split into multiple files, making the code much more maintainable, testable and easy to understand, with the downside that the module now needs to be installed or clone entirely into your project.

To not break one of the most commonly used integrations of this module, there is a mod_pbxproj.py file in the root folder that will check if the new module is installed in your system, and if not, it will install it for you in the user space, and expose the new XcodeProject object to your script.

Unity3d legacy

Copy the file mod_pbxproj.py into your project. On your post build script import:

from mod_pbxproj import XcodeProject

Note: This script internally will import the pbxproj module into your script

Using the installed module

If you installed the module using pip or setup.py script, the module will be available for you already. Simply import the module into your script:

from pbxproj import XcodeProject