MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / overlayXcodeAppBundle

Function overlayXcodeAppBundle

scripts/experimental/swiftui-preview.mjs:784–804  ·  view source on GitHub ↗
(hostAppPath, xcode)

Source from the content-addressed store, hash-verified

782}
783
784function overlayXcodeAppBundle(hostAppPath, xcode) {
785 const sourceApp = xcode.appPath;
786 for (const entry of fs.readdirSync(sourceApp, { withFileTypes: true })) {
787 if (
788 entry.name === "Info.plist" ||
789 entry.name === "_CodeSignature" ||
790 entry.name === "PkgInfo" ||
791 entry.name.endsWith(".app") ||
792 entry.name === path.basename(sourceApp, ".app")
793 ) {
794 continue;
795 }
796 copyRecursive(
797 path.join(sourceApp, entry.name),
798 path.join(hostAppPath, entry.name),
799 );
800 }
801 console.log(
802 `[simdeck-preview] overlaid resources/frameworks from ${sourceApp}`,
803 );
804}
805
806function copyRecursive(source, destination) {
807 fs.rmSync(destination, { recursive: true, force: true });

Callers 1

mainFunction · 0.85

Calls 2

copyRecursiveFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected