Skip to content

fix(apple): Handle CFBundlePrimaryIcon as string in get_icon_info (LAUNCHPAD-72)#606

Draft
sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/launchpad-72-icon-info-type-error
Draft

fix(apple): Handle CFBundlePrimaryIcon as string in get_icon_info (LAUNCHPAD-72)#606
sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/launchpad-72-icon-info-type-error

Conversation

@sentry
Copy link
Copy Markdown
Contributor

@sentry sentry Bot commented Apr 24, 2026

This PR fixes an AttributeError: 'str' object has no attribute 'get' that occurred in launchpad.artifacts.apple.zipped_xcarchive.get_icon_info.

Root Cause:
Some iOS Info.plist files can define CFBundleIcons.CFBundlePrimaryIcon as a plain string (e.g., 'App Icon') instead of the expected dictionary structure. The code was checking isinstance(primary_icon, dict) for CFBundleIconName but then unconditionally called .get('CFBundleIconFiles', []) on primary_icon. When primary_icon was a string, this resulted in the AttributeError.

Fix:
Moved the lookup for CFBundleIconFiles and its subsequent type check inside the if isinstance(primary_icon, dict): block. This ensures that .get() is only called on primary_icon when it is confirmed to be a dictionary. If CFBundlePrimaryIcon is a string, primary_icon_files will remain an empty list, allowing the get_app_icon() method to gracefully handle the missing icon files.

Fixes LAUNCHPAD-72

@sentry
Copy link
Copy Markdown
Contributor Author

sentry Bot commented Apr 24, 2026

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants