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 Apple Vision Pro device type #357

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

priitlatt
Copy link
Contributor

Read Device Information and List Devices App Store Connect API endpoints can return devices whose deviceClass attribute value is APPLE_VISION_PRO.

As of now such a device class is not supported and causes issues when the device class info is used, such as

[07:54:38 02-10-2023] ERROR cli_app.py:116 > Exception traceback:
Traceback (most recent call last):
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 206, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 163, in _invoke_action
    return cli_action(**action_args)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/cli/cli_app.py", line 458, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1058, in fetch_signing_files
    profiles = self._get_or_create_profiles(
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1212, in _get_or_create_profiles
    profiles.extend(created_profiles)
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1148, in _create_missing_profiles
    device_ids = [d.id for d in devices if d.attributes.deviceClass.is_compatible(profile_type)]
  File "/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/tools/app_store_connect.py", line 1148, in <listcomp>
    device_ids = [d.id for d in devices if d.attributes.deviceClass.is_compatible(profile_type)]
AttributeError: 'GracefulDeviceClass' object has no attribute 'is_compatible'

This PR defines APPLE_VISION_PRO value for enumeration codemagic.apple.resources.enums.DeviceClass.

@priitlatt priitlatt added the bug Something isn't working label Oct 2, 2023
@priitlatt priitlatt marked this pull request as ready for review October 2, 2023 08:19
@priitlatt priitlatt merged commit f808966 into master Oct 2, 2023
@priitlatt priitlatt deleted the bugfix/support-apple-vision-pro-device-type branch October 2, 2023 08:33
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.

1 participant