本文整理汇总了Python中pbxproj.XcodeProject.add_project方法的典型用法代码示例。如果您正苦于以下问题:Python XcodeProject.add_project方法的具体用法?Python XcodeProject.add_project怎么用?Python XcodeProject.add_project使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pbxproj.XcodeProject
的用法示例。
在下文中一共展示了XcodeProject.add_project方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testAddProjectNotForced
# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
def testAddProjectNotForced(self):
project = XcodeProject(self.obj)
_ = project.add_project('samplescli/dependency.xcodeproj', file_options=FileOptions(create_build_files=False))
reference_proxies = project.add_project('samplescli/dependency.xcodeproj', force=False,
file_options=FileOptions(create_build_files=False))
self.assertListEqual(reference_proxies, [])
示例2: testAddProjectWithoutBuildPhases
# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
def testAddProjectWithoutBuildPhases(self):
project = XcodeProject(self.obj)
frameworks = project.objects.get_objects_in_section('PBXFrameworksBuildPhase').__len__()
resources = project.objects.get_objects_in_section('PBXResourcesBuildPhase').__len__()
build_files = project.objects.get_objects_in_section('PBXBuildFile').__len__()
reference_proxies = project.add_project('samplescli/dependency.xcodeproj', file_options=FileOptions(create_build_files=False))
self.assertEqual(reference_proxies.__len__(), 2)
self.assertEqual(project.objects.get_objects_in_section(u'PBXContainerItemProxy').__len__(), 2)
self.assertEqual(project.objects.get_objects_in_section(u'PBXReferenceProxy').__len__(), 2)
self.assertEqual(project.objects.get_objects_in_section(u'PBXProject')[0].projectReferences.__len__(), 1)
# check that the buildFiles where added
self.assertEqual(project.objects.get_objects_in_section('PBXBuildFile').__len__(), build_files)
self.assertEqual(project.objects.get_objects_in_section('PBXFrameworksBuildPhase').__len__(), frameworks)
self.assertEqual(project.objects.get_objects_in_section('PBXResourcesBuildPhase').__len__(), resources)
示例3: testAddProjectDoesntExists
# 需要导入模块: from pbxproj import XcodeProject [as 别名]
# 或者: from pbxproj.XcodeProject import add_project [as 别名]
def testAddProjectDoesntExists(self):
project = XcodeProject(self.obj)
reference_proxies = project.add_project(os.path.abspath("samples/unexistingFile.m"))
# nothing to do if the file is absolute but doesn't exist
self.assertIsNone(reference_proxies)