@@ -66,6 +66,7 @@ def __init__(self, path: Path) -> None:
6666 self ._extract_dir = self ._zip_provider .extract_to_temp_directory ()
6767 self ._app_bundle_path : Path | None = None
6868 self ._plist : dict [str , Any ] | None = None
69+ self ._archive_plist : dict [str , Any ] | None = None
6970 self ._provisioning_profile : dict [str , Any ] | None = None
7071 self ._dsym_info : dict [str , DsymInfo ] | None = None
7172
@@ -89,6 +90,30 @@ def get_plist(self) -> dict[str, Any]:
8990 except Exception as e :
9091 raise RuntimeError ("Failed to parse Info.plist" ) from e
9192
93+ @sentry_sdk .trace
94+ def get_archive_plist (self ) -> dict [str , Any ] | None :
95+ """Get the archive-level Info.plist (not the app bundle's Info.plist)."""
96+ if self ._archive_plist is not None :
97+ return self ._archive_plist
98+
99+ xcarchive_dirs = list (self ._extract_dir .glob ("*.xcarchive" ))
100+ if not xcarchive_dirs :
101+ logger .debug (f"No .xcarchive directory found in { self ._extract_dir } " )
102+ return None
103+
104+ xcarchive_dir = xcarchive_dirs [0 ]
105+ plist_path = xcarchive_dir / "Info.plist"
106+
107+ try :
108+ with open (plist_path , "rb" ) as f :
109+ plist_data = plistlib .load (f )
110+
111+ self ._archive_plist = plist_data
112+ return plist_data
113+ except Exception :
114+ logger .debug (f"Failed to parse archive Info.plist at { plist_path } " , exc_info = True )
115+ return None
116+
92117 @sentry_sdk .trace
93118 def get_app_icon (self ) -> bytes | None :
94119 """Get the primary app icon, decoded from crushed PNG format."""
0 commit comments