Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Support manageAppVersionAndBuildNumber key in export options property list #201

Merged
merged 6 commits into from
Feb 4, 2022

Conversation

VeArnold
Copy link
Contributor

@VeArnold VeArnold commented Feb 4, 2022

Starting from Xcode 13 export options support new key named manageAppVersionAndBuildNumber. Read more about it from this Apple Developer Forum thread.

This key is not supported by ExportOptions class and as such executing xcode-project build-ipa will fail in case provided export options property list contains said key manageAppVersionAndBuildNumber. Full stacktrace for the error is as follows:

Traceback (most recent call last):
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 200, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 156, in _invoke_action
    return cli_action(**action_args)
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 412, in wrapper
    return func(*args, **kwargs)
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/tools/xcode_project.py", line 198, in build_ipa
    export_options = self._get_export_options_from_path(export_options_plist)
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/tools/xcode_project.py", line 550, in _get_export_options_from_path
    return ExportOptions.from_path(export_options_plist)
  File "/Users/builder/.pyenv/versions/3.8.7/lib/python3.8/site-packages/codemagic/models/export_options.py", line 195, in from_path
    return ExportOptions(**data)
TypeError: __init__() got an unexpected keyword argument 'manageAppVersionAndBuildNumber'

This parameter was introduced in Xcode 13 with a default value of true. Currently, it is not possible to set the value to false.

Updated actions:

  • xcode-project build-ipa
  • xcode-project use-profiles

@VeArnold VeArnold requested a review from priitlatt February 4, 2022 15:48
@VeArnold VeArnold changed the title Add manageAppVersionAndBuildNumber to export options Bugfix: Add manageAppVersionAndBuildNumber to export options Feb 4, 2022
@priitlatt
Copy link
Contributor

priitlatt commented Feb 4, 2022

Please add tests.

@priitlatt priitlatt added the bug Something isn't working label Feb 4, 2022
@priitlatt priitlatt merged commit 644e8c4 into master Feb 4, 2022
@priitlatt priitlatt deleted the fix/manage-app-version-export-option branch February 4, 2022 16:26
@priitlatt priitlatt changed the title Bugfix: Add manageAppVersionAndBuildNumber to export options Bugfix: Support manageAppVersionAndBuildNumber key in export options property list Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants