How to use the pbxproj.XcodeProject.XcodeProject function in pbxproj

To help you get started, we’ve selected a few pbxproj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kronenthaler / mod-pbxproj / pbxproj / XcodeProject.py View on Github external
def __repr__(self):
        return u'// !$*UTF8*$!\n' + super(XcodeProject, self).__repr__()
github kronenthaler / mod-pbxproj / tests / pbxsections / TestPBXBuildFile.py View on Github external
def testGetComment(self):
        obj = {
            'objects': {
                '1': {"isa": "PBXBuildFile", "name": "something", 'fileRef': 'FDDF6A571C68E5B100D7A645'},
                'FDDF6A571C68E5B100D7A645': {'isa': 'PBXFileReference', "name": "real name"},
                "X": {'isa': 'phase', 'name': 'X', 'files': ['1']}
            }
        }
        dobj = XcodeProject().parse(obj)

        self.assertEqual(dobj.objects['1']._get_comment(), "real name in X")
github kronenthaler / mod-pbxproj / tests / pbxsections / TestPBXBuildFile.py View on Github external
def testGetCommentForNonExistentRef(self):
        obj = {
            'objects': {
                'FDDF6A571C68E5B100D7A645': {'isa': 'PBXBuildFile'},
                "X": {'isa': 'phase', 'name': 'X', 'files': ['FDDF6A571C68E5B100D7A645']}
            }
        }
        dobj = XcodeProject().parse(obj)

        self.assertEqual(dobj.objects['FDDF6A571C68E5B100D7A645']._get_comment(), "(null) in X")
github kronenthaler / mod-pbxproj / pbxproj / pbxcli / __init__.py View on Github external
def open_project(args):
    if os.path.isdir(args[u'']):
        args[u''] += u"/project.pbxproj"

    if not os.path.isfile(args[u'']):
        raise Exception(u'Project file not found')

    return XcodeProject.load(args[u''])
github kronenthaler / mod-pbxproj / pbxproj / XcodeProject.py View on Github external
def load(cls, path):
        import openstep_parser as osp
        tree = osp.OpenStepDecoder.ParseFromFile(open(path, 'r'))
        return XcodeProject(tree, path)