You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: I want to change the minimum version of the project only if it is different from a given value. The idea is I don't want to mess with the project file if I don't have to.
read the current value
compare to another value
if different change it and save the new project file.
There are some reasons why this API does not exist. The following snippet will probably solve your issue and will help to explain why is not practical.
for conf in project.objects.get_project_configurations('Debug'): # returns a generator
print(conf.buildSettings['IPHONEOS_DEPLOYMENT_TARGET'])
As you can see, the main problem is that the flags (for projects and/or targets) are bound to a configuration. You need to specify the configuration you want to add them to or read them from.
In most methods, a configuration_name parameter is provided, which can be ignored (defaults to None), in which case the action takes place in ALL configurations available. There already exist a set_flags method for the targets and add_project_flags for projects, but they do not return anything because it can be applied to multiple configurations.
I'm trying to not add too many wrapper methods as it will become harder and harder to maintain, but if it makes sense i will include it. But no promises.
thanks for this package!
Question: I want to change the minimum version of the project only if it is different from a given value. The idea is I don't want to mess with the project file if I don't have to.
so something like
minimumVersion = project.get_flag(IPHONEOS_DEPLOYMENT_TARGET)
with the standard options to get it from a given target...
is there a way to do this ?
May be the "set_flag" method could return how many flags got changed ? we could decide to save or not then...
Also, would be nice to have a single page with all the methods...
thanks in advance for your help!
The text was updated successfully, but these errors were encountered: