@@ -336,7 +336,7 @@ use dioxus_cli_opt::{process_file_to, AssetManifest};
336336use itertools:: Itertools ;
337337use krates:: { cm:: TargetKind , NodeId } ;
338338use manganis:: { AssetOptions , BundledAsset , SwiftPackageMetadata } ;
339- use manganis_core:: { AndroidArtifactMetadata , AppleWidgetExtensionMetadata , AssetVariant } ;
339+ use manganis_core:: { AndroidArtifactMetadata , AssetVariant } ;
340340use rayon:: prelude:: { IntoParallelRefIterator , ParallelIterator } ;
341341use serde:: { Deserialize , Serialize } ;
342342use std:: { borrow:: Cow , ffi:: OsString } ;
@@ -456,7 +456,6 @@ pub struct BuildArtifacts {
456456 pub ( crate ) assets : AssetManifest ,
457457 pub ( crate ) android_artifacts : Vec < AndroidArtifactMetadata > ,
458458 pub ( crate ) swift_sources : Vec < SwiftPackageMetadata > ,
459- pub ( crate ) widget_extensions : Vec < AppleWidgetExtensionMetadata > ,
460459 pub ( crate ) mode : BuildMode ,
461460 pub ( crate ) patch_cache : Option < Arc < HotpatchModuleCache > > ,
462461 pub ( crate ) depinfo : RustcDepInfo ,
@@ -1118,14 +1117,14 @@ impl BuildRequest {
11181117 . context ( "Failed to embed Swift standard libraries" ) ?;
11191118 }
11201119
1121- // Compile and install Apple Widget Extensions
1122- if matches ! ( self . bundle, BundleFormat :: Ios | BundleFormat :: MacOS )
1123- && !artifacts. widget_extensions . is_empty ( )
1124- {
1125- self . compile_widget_extensions ( & artifacts. widget_extensions )
1126- . await
1127- . context ( "Failed to compile widget extensions" ) ?;
1128- }
1120+ // // Compile and install Apple Widget Extensions
1121+ // if matches!(self.bundle, BundleFormat::Ios | BundleFormat::MacOS)
1122+ // && !artifacts.widget_extensions.is_empty()
1123+ // {
1124+ // self.compile_widget_extensions(&artifacts.widget_extensions)
1125+ // .await
1126+ // .context("Failed to compile widget extensions")?;
1127+ // }
11291128
11301129 self . update_manifests_with_permissions ( )
11311130 . context ( "Failed to update manifests with permissions" ) ?;
@@ -1317,7 +1316,7 @@ impl BuildRequest {
13171316 }
13181317
13191318 // Extract all linker metadata (assets, Android/iOS plugins, widget extensions) in a single pass.
1320- let ( assets, android_artifacts, swift_sources, widget_extensions ) =
1319+ let ( assets, android_artifacts, swift_sources) =
13211320 self . collect_assets_and_metadata ( & exe, ctx) . await ?;
13221321
13231322 let time_end = SystemTime :: now ( ) ;
@@ -1338,7 +1337,6 @@ impl BuildRequest {
13381337 assets,
13391338 android_artifacts,
13401339 swift_sources,
1341- widget_extensions,
13421340 mode,
13431341 depinfo,
13441342 root_dir : self . root_dir ( ) ,
@@ -1359,7 +1357,6 @@ impl BuildRequest {
13591357 AssetManifest ,
13601358 Vec < AndroidArtifactMetadata > ,
13611359 Vec < SwiftPackageMetadata > ,
1362- Vec < AppleWidgetExtensionMetadata > ,
13631360 ) > {
13641361 use super :: assets:: extract_symbols_from_file;
13651362
@@ -1368,15 +1365,14 @@ impl BuildRequest {
13681365 let needs_swift_packages = matches ! ( self . bundle, BundleFormat :: Ios | BundleFormat :: MacOS ) ;
13691366
13701367 if skip_assets && !needs_android_artifacts && !needs_swift_packages {
1371- return Ok ( ( AssetManifest :: default ( ) , Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( ) ) ) ;
1368+ return Ok ( ( AssetManifest :: default ( ) , Vec :: new ( ) , Vec :: new ( ) ) ) ;
13721369 }
13731370
13741371 ctx. status_extracting_assets ( ) ;
13751372 let super :: assets:: SymbolExtractionResult {
13761373 assets : extracted_assets,
13771374 android_artifacts,
13781375 swift_packages,
1379- widget_extensions,
13801376 } = extract_symbols_from_file ( exe) . await ?;
13811377
13821378 let asset_manifest = if skip_assets {
@@ -1443,27 +1439,7 @@ impl BuildRequest {
14431439 }
14441440 }
14451441
1446- if !widget_extensions. is_empty ( ) {
1447- tracing:: debug!(
1448- "Found {} Apple Widget Extension declaration(s)" ,
1449- widget_extensions. len( )
1450- ) ;
1451- for widget in & widget_extensions {
1452- tracing:: debug!(
1453- " Widget: {} (path={} bundle_id_suffix={})" ,
1454- widget. display_name. as_str( ) ,
1455- widget. package_path. as_str( ) ,
1456- widget. bundle_id_suffix. as_str( )
1457- ) ;
1458- }
1459- }
1460-
1461- Ok ( (
1462- asset_manifest,
1463- android_artifacts,
1464- swift_packages,
1465- widget_extensions,
1466- ) )
1442+ Ok ( ( asset_manifest, android_artifacts, swift_packages) )
14671443 }
14681444
14691445 /// Install Android plugin artifacts by bundling source folders as Gradle submodules.
@@ -1771,79 +1747,79 @@ impl BuildRequest {
17711747 Ok ( ( ) )
17721748 }
17731749
1774- /// Compile and install Apple Widget Extensions from embedded metadata.
1775- ///
1776- /// This processes widget extensions discovered via the widget!() macro by:
1777- /// 1. Compiling the Swift package as a Widget Extension executable
1778- /// 2. Creating the .appex bundle structure with Info.plist
1779- /// 3. Installing to the app's PlugIns folder
1780- async fn compile_widget_extensions (
1781- & self ,
1782- widget_extensions : & [ AppleWidgetExtensionMetadata ] ,
1783- ) -> Result < ( ) > {
1784- tracing:: info!(
1785- "Compiling {} Apple Widget Extension(s)" ,
1786- widget_extensions. len( )
1787- ) ;
1788-
1789- let build_dir = self . target_dir . join ( "widget-build" ) ;
1790- std:: fs:: create_dir_all ( & build_dir) ?;
1791-
1792- // Get the app bundle identifier for deriving widget bundle IDs
1793- let app_bundle_id = self . bundle_identifier ( ) ;
1794-
1795- let plugins_dir = self . plugins_folder ( ) ;
1796- std:: fs:: create_dir_all ( & plugins_dir) ?;
1797-
1798- for meta in widget_extensions {
1799- let widget_source = super :: ios_swift:: AppleWidgetSource {
1800- source_path : PathBuf :: from ( meta. package_path . as_str ( ) ) ,
1801- display_name : meta. display_name . as_str ( ) . to_string ( ) ,
1802- bundle_id_suffix : meta. bundle_id_suffix . as_str ( ) . to_string ( ) ,
1803- deployment_target : meta. deployment_target . as_str ( ) . to_string ( ) ,
1804- module_name : meta. module_name . as_str ( ) . to_string ( ) ,
1805- } ;
1806-
1807- // Compile the widget extension
1808- let appex_path = super :: ios_swift:: compile_apple_widget (
1809- & widget_source,
1810- & self . triple ,
1811- & build_dir,
1812- & app_bundle_id,
1813- self . release ,
1814- )
1815- . await
1816- . with_context ( || {
1817- format ! (
1818- "Failed to compile widget extension '{}'" ,
1819- widget_source. display_name
1820- )
1821- } ) ?;
1822-
1823- // Install the .appex bundle to PlugIns/
1824- let appex_name = appex_path
1825- . file_name ( )
1826- . map ( |n| n. to_string_lossy ( ) . to_string ( ) )
1827- . unwrap_or_else ( || "Widget.appex" . to_string ( ) ) ;
1828- let dest_path = plugins_dir. join ( & appex_name) ;
1829-
1830- // Remove existing if present
1831- if dest_path. exists ( ) {
1832- std:: fs:: remove_dir_all ( & dest_path) ?;
1833- }
1834-
1835- // Copy the entire .appex bundle
1836- self . copy_dir_recursive ( & appex_path, & dest_path) ?;
1837-
1838- tracing:: info!(
1839- "Installed widget extension '{}' to {}" ,
1840- widget_source. display_name,
1841- dest_path. display( )
1842- ) ;
1843- }
1844-
1845- Ok ( ( ) )
1846- }
1750+ // // / Compile and install Apple Widget Extensions from embedded metadata.
1751+ // // /
1752+ // // / This processes widget extensions discovered via the widget!() macro by:
1753+ // // / 1. Compiling the Swift package as a Widget Extension executable
1754+ // // / 2. Creating the .appex bundle structure with Info.plist
1755+ // // / 3. Installing to the app's PlugIns folder
1756+ // async fn compile_widget_extensions(
1757+ // &self,
1758+ // widget_extensions: &[AppleWidgetExtensionMetadata],
1759+ // ) -> Result<()> {
1760+ // tracing::info!(
1761+ // "Compiling {} Apple Widget Extension(s)",
1762+ // widget_extensions.len()
1763+ // );
1764+
1765+ // let build_dir = self.target_dir.join("widget-build");
1766+ // std::fs::create_dir_all(&build_dir)?;
1767+
1768+ // // Get the app bundle identifier for deriving widget bundle IDs
1769+ // let app_bundle_id = self.bundle_identifier();
1770+
1771+ // let plugins_dir = self.plugins_folder();
1772+ // std::fs::create_dir_all(&plugins_dir)?;
1773+
1774+ // for meta in widget_extensions {
1775+ // let widget_source = super::ios_swift::AppleWidgetSource {
1776+ // source_path: PathBuf::from(meta.package_path.as_str()),
1777+ // display_name: meta.display_name.as_str().to_string(),
1778+ // bundle_id_suffix: meta.bundle_id_suffix.as_str().to_string(),
1779+ // deployment_target: meta.deployment_target.as_str().to_string(),
1780+ // module_name: meta.module_name.as_str().to_string(),
1781+ // };
1782+
1783+ // // Compile the widget extension
1784+ // let appex_path = super::ios_swift::compile_apple_widget(
1785+ // &widget_source,
1786+ // &self.triple,
1787+ // &build_dir,
1788+ // &app_bundle_id,
1789+ // self.release,
1790+ // )
1791+ // .await
1792+ // .with_context(|| {
1793+ // format!(
1794+ // "Failed to compile widget extension '{}'",
1795+ // widget_source.display_name
1796+ // )
1797+ // })?;
1798+
1799+ // // Install the .appex bundle to PlugIns/
1800+ // let appex_name = appex_path
1801+ // .file_name()
1802+ // .map(|n| n.to_string_lossy().to_string())
1803+ // .unwrap_or_else(|| "Widget.appex".to_string());
1804+ // let dest_path = plugins_dir.join(&appex_name);
1805+
1806+ // // Remove existing if present
1807+ // if dest_path.exists() {
1808+ // std::fs::remove_dir_all(&dest_path)?;
1809+ // }
1810+
1811+ // // Copy the entire .appex bundle
1812+ // self.copy_dir_recursive(&appex_path, &dest_path)?;
1813+
1814+ // tracing::info!(
1815+ // "Installed widget extension '{}' to {}",
1816+ // widget_source.display_name,
1817+ // dest_path.display()
1818+ // );
1819+ // }
1820+
1821+ // Ok(())
1822+ // }
18471823
18481824 /// Update platform manifests with permissions from Dioxus.toml config
18491825 ///
@@ -2573,13 +2549,12 @@ impl BuildRequest {
25732549 }
25742550
25752551 // Now extract linker metadata from the fat binary (assets, plugin data)
2576- let ( assets, android_artifacts, swift_sources, widget_extensions ) = self
2552+ let ( assets, android_artifacts, swift_sources) = self
25772553 . collect_assets_and_metadata ( & self . patch_exe ( artifacts. time_start ) , ctx)
25782554 . await ?;
25792555 artifacts. assets = assets;
25802556 artifacts. android_artifacts = android_artifacts;
25812557 artifacts. swift_sources = swift_sources;
2582- artifacts. widget_extensions = widget_extensions;
25832558
25842559 // If this is a web build, reset the index.html file in case it was modified by SSG
25852560 self . write_index_html ( & artifacts. assets )
0 commit comments