History

chore(mobile): remove obsolete widget wiring script (#9960)

Julius Marminge committed 2 months ago

Commit 2759ef01 parent 4a42fc61 file · +0 −30Browse files

Unified · Split

apps/mobile/scripts/wire-widget-asset-catalog.cjs+0−30
@@ -1,30 +0,0 @@
1"use strict";
2
3// One-off: apply the widget asset-catalog wiring to the already-generated
4// ios/ project so the current build compiles ExpoWidgetsTarget/Assets.xcassets
5// without a full `expo prebuild`. The durable equivalent lives in
6// plugins/withWidgetLogoAsset.cjs and runs on prebuild.
7
8const path = require("path");
9const fs = require("fs");
10
11const xcodePath = require.resolve("xcode", {
12 paths: [
13 require.resolve("@expo/config-plugins", { paths: [require.resolve("expo/package.json")] }),
14 ],
15});
16const xcode = require(xcodePath);
17const { addWidgetAssetCatalog } = require("../plugins/lib/addWidgetAssetCatalog.cjs");
18
19const pbxprojPath = path.join(__dirname, "..", "ios", "T3CodeDev.xcodeproj", "project.pbxproj");
20const proj = xcode.project(pbxprojPath);
21proj.parseSync();
22
23const added = addWidgetAssetCatalog(proj, { targetName: "ExpoWidgetsTarget" });
24
25if (added) {
26 fs.writeFileSync(pbxprojPath, proj.writeSync());
27 console.log("Added widget asset-compile phase to ExpoWidgetsTarget.");
28} else {
29 console.log("No change: phase already present.");
30}