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: Allow configuring distributionBundleIdentifier export option #218

Merged
merged 3 commits into from
Apr 29, 2022

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Apr 29, 2022

When building Xcode projects that use App Clips it is necessary to specify distributionBundleIdentifier in export options property list for exporting the xcarchive. Right now setting this export option results in the following error:

[15:13:58 29-04-2022] ERROR cli_app.py:113 > Exception traceback:
Traceback (most recent call last):
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/cli/cli_app.py", line 200, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/cli/cli_app.py", line 156, in _invoke_action
    return cli_action(**action_args)
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/cli/cli_app.py", line 412, in wrapper
    return func(*args, **kwargs)
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/tools/xcode_project.py", line 137, in use_profiles
    export_options = code_signing_settings_manager.generate_export_options(custom_export_options)
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/models/code_signing_settings_manager.py", line 196, in generate_export_options
    export_options.update(custom_options or {})
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/models/export_options.py", line 188, in update
    self.set_value(field_name, value)
  File "/Users/priit/.virtualenvs/cli-tools-shZ38mB-/lib/python3.7/site-packages/codemagic_cli_tools-0.24.1-py3.7.egg/codemagic/models/export_options.py", line 172, in set_value
    raise ValueError(f'Invalid filed {field_name}')
ValueError: Invalid filed distributionBundleIdentifier

Update ExportOptions class definition to allow specifying this value.

Updated actions

  • xcode-project use-profiles

In order to include distributionBundleIdentifier in the generated export options use --custom-export-options:

xcode-project use-profiles --custom-export-options '{"distributionBundleIdentifier": "com.example.export-bundle-id"}'

@priitlatt priitlatt added the bug Something isn't working label Apr 29, 2022
@priitlatt priitlatt self-assigned this Apr 29, 2022
@priitlatt priitlatt marked this pull request as ready for review April 29, 2022 12:14
@priitlatt priitlatt merged commit f1e8b8b into master Apr 29, 2022
@priitlatt priitlatt deleted the bugfix/distribution-bundle-identifier-export-option branch April 29, 2022 12:27
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