[BUG]Once the program calls save(), It would be
BBC6BAE9 opened this issue · comments
BBC6BAE9 commented
Describe the bug
A clear and concise description of what the bug is.
System information
- pbxproj version used: latest
- python version used: 2.7
- Xcode version used:12.3
To Reproduce
Steps to reproduce the behavior:
def mod_pbxproj_info(self, target, params):
project = XcodeProject.Load(self.pbxproj_file_path)
project.backup()
root_object_pointer = project["rootObject"]
objects = project["objects"]
root_object = objects[root_object_pointer]
target_pointers = root_object["targets"]
for target_pointer in target_pointers:
target_object = objects[target_pointer]
if target_object["name"] == target:
buildConfiguration_list_pointer = target_object["buildConfigurationList"]
buildConfiguration_list_object = objects[buildConfiguration_list_pointer]
buildConfiguration_pointers = buildConfiguration_list_object["buildConfigurations"]
for buildConfiguration_pointer in buildConfiguration_pointers:
build_configuration_object = objects[buildConfiguration_pointer]
build_settings = build_configuration_object["buildSettings"]
print(build_settings)
build_settings["PROVISIONING_PROFILE_SPECIFIER"] = params["PROVISIONING_PROFILE_SPECIFIER"]
build_settings["CODE_SIGN_IDENTITY"] = params["CODE_SIGN_IDENTITY"]
build_settings["PRODUCT_BUNDLE_IDENTIFIER"] = params["PRODUCT_BUNDLE_IDENTIFIER"]
build_settings["CODE_SIGN_STYLE"] = params["CODE_SIGN_STYLE"]
build_settings["DEVELOPMENT_TEAM"] = params["DEVELOPMENT_TEAM"]
project.save()
Expected behavior
OK using xcodebuild command
Ignacio Calderon commented
Thanks for your report. Python 2.7 was declared End-of-life in January 1st, 2020. Meaning that no support is given to python 2. Because of that reason, this library only works with python 3.5 or up.
Upgrade your python installation and reinstall the library using the correct version of pip
(usually aliased as pip3
).