Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b5171b8
feat: windows runtime support
triniwiz May 11, 2026
ba29271
fix(windows): syncing
triniwiz May 12, 2026
a2a6041
fix: missing import
triniwiz May 12, 2026
2fc8ca7
chore(windows): polish
triniwiz May 14, 2026
3d97912
fix: windows support
triniwiz May 16, 2026
5bbe284
fix(windows): logging
triniwiz May 17, 2026
1ee87fc
fix(windows): plugins & .net support
triniwiz May 21, 2026
dbff762
chore: improve windows app configs
triniwiz May 24, 2026
77609c0
fix: missing zeroGuid
triniwiz May 28, 2026
6c26545
chore: window.0
triniwiz May 28, 2026
b2a6cb5
fix(windows): test
triniwiz May 28, 2026
32f33ff
Merge branch 'main' into feat/windows
triniwiz May 29, 2026
ae5c765
feat(windows): types generation
triniwiz Jun 1, 2026
c9d9c4f
fix(windows): logs
triniwiz Jun 4, 2026
8f03ee4
fix(windows): buildOutputPath
triniwiz Jun 10, 2026
bc517c0
feat(doctor): add windows support
triniwiz Jun 13, 2026
f73ecf7
fix: fs rename add retry with backoff
triniwiz Jun 14, 2026
c702308
fix(windows): sync lock
triniwiz Jun 14, 2026
1dbb30b
fix(windows): fileSync
triniwiz Jun 14, 2026
7a54c25
fix(windows): devtools auto-start
triniwiz Jun 16, 2026
95cc0ed
feat(windows): release
triniwiz Jun 26, 2026
c7f8432
chore: windows help
triniwiz Jun 26, 2026
e5ef0ac
fix(windows): avoid EPERM rename error during platform project creation
dyazincahya Jun 29, 2026
ea72c74
Merge pull request #6066 from dyazincahya/feat/windows
triniwiz Jul 12, 2026
0f05f01
fix(windows): framework name
triniwiz Jul 30, 2026
2053117
feat(windows): include napi packages
triniwiz Jul 30, 2026
c80a64b
feat(windows): encrypt bundle
triniwiz Aug 5, 2026
6286e82
Merge remote-tracking branch 'origin/main' into feat/windows
triniwiz Sep 23, 2026
eecb511
feat(windows): vite HMR livesync, comment cleanup
triniwiz Sep 24, 2026
a299797
fix(windows): drop dead dotnet-bridge marker check
triniwiz Sep 29, 2026
86dd40c
feat(windows): print the DevTools URL for ns debug windows
triniwiz Sep 30, 2026
e9be2f0
fix(windows): honor --no-auto-guid
triniwiz Sep 30, 2026
69f2c1f
fix(doctor): check .NET SDK 10+ and Developer Mode on Windows
triniwiz Sep 30, 2026
3c839a5
docs(windows): fix inspector port, prerequisites and build output
triniwiz Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(windows): syncing
  • Loading branch information
triniwiz committed May 12, 2026
commit ba29271faffef96df36a39cee6f717ad7723161e
2 changes: 1 addition & 1 deletion lib/common/mobile/windows/windows-device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class WindowsDevice implements Mobile.IDevice {
errorHelp: null,
isTablet: false,
type: DeviceTypes.Device,
platform: "windows",
platform: "Windows",
connectionTypes: [DeviceConnectionType.Local],
};

Expand Down
10 changes: 10 additions & 0 deletions lib/controllers/prepare-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,16 @@ export class PrepareController extends EventEmitter {
"app",
"package.json",
);
} else if (
this.$mobileHelper.isWindowsPlatform(platformData.platformNameLowerCase)
) {
// Windows apps place the packaged app under <projectRoot>/<projectName>/App
packagePath = path.join(
platformData.projectRoot,
projectData.projectName,
"app",
"package.json",
);
} else {
packagePath = path.join(
platformData.projectRoot,
Expand Down
11 changes: 10 additions & 1 deletion lib/data/prepare-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PrepareData extends ControllerDataBase {
constructor(
public projectDir: string,
public platform: string,
data: IOptions
data: IOptions,
) {
super(projectDir, platform, data);

Expand Down Expand Up @@ -64,3 +64,12 @@ export class IOSPrepareData extends PrepareData {
}

export class AndroidPrepareData extends PrepareData {}

export class WindowsPrepareData extends PrepareData {
public packageFamilyName?: string;

constructor(projectDir: string, platform: string, data: IOptions) {
super(projectDir, platform, data);
this.packageFamilyName = (data as any).packageFamilyName;
}
}
57 changes: 40 additions & 17 deletions lib/services/platform/add-platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class AddPlatformService implements IAddPlatformService {
// private $projectDataService: IProjectDataService,
private $packageManager: IPackageManager,
private $terminalSpinnerService: ITerminalSpinnerService,
private $analyticsService: IAnalyticsService // private $tempService: ITempService
private $analyticsService: IAnalyticsService, // private $tempService: ITempService
) {}

public async addProjectHost() {}
Expand All @@ -34,7 +34,7 @@ export class AddPlatformService implements IAddPlatformService {
projectData: IProjectData,
platformData: IPlatformData,
packageToInstall: string,
addPlatformData: IAddPlatformData
addPlatformData: IAddPlatformData,
): Promise<string> {
const spinner = this.$terminalSpinnerService.createSpinner();

Expand All @@ -46,11 +46,34 @@ export class AddPlatformService implements IAddPlatformService {
// : await this.installPackage(projectData.projectDir, packageToInstall);
const frameworkDirPath = await this.installPackage(
projectData.projectDir,
packageToInstall
packageToInstall,
);

const frameworkPackageJsonPath = path.join(
frameworkDirPath || "",
"..",
"package.json",
);

if (!frameworkDirPath || !this.$fs.exists(frameworkPackageJsonPath)) {
throw new Error(
`Installed framework package.json not found at ${frameworkPackageJsonPath}`,
);
}

const frameworkPackageJsonContent = this.$fs.readJson(
path.join(frameworkDirPath, "..", "package.json")
frameworkPackageJsonPath,
);

if (
!frameworkPackageJsonContent ||
!frameworkPackageJsonContent.version
) {
throw new Error(
`Installed framework package.json at ${frameworkPackageJsonPath} does not contain a version`,
);
}

const frameworkVersion = frameworkPackageJsonContent.version;

// await this.setPlatformVersion(platformData, projectData, frameworkVersion);
Expand All @@ -64,15 +87,15 @@ export class AddPlatformService implements IAddPlatformService {
platformData,
projectData,
frameworkDirPath,
frameworkVersion
frameworkVersion,
);
}

return frameworkVersion;
} catch (err) {
const platformPath = path.join(
projectData.platformsDir,
platformData.platformNameLowerCase
platformData.platformNameLowerCase,
);
this.$fs.deleteDirectory(platformPath);
throw err;
Expand All @@ -84,11 +107,11 @@ export class AddPlatformService implements IAddPlatformService {
public async setPlatformVersion(
platformData: IPlatformData,
projectData: IProjectData,
frameworkVersion: string
frameworkVersion: string,
): Promise<void> {
await this.installPackage(
projectData.projectDir,
`${platformData.frameworkPackageName}@${frameworkVersion}`
`${platformData.frameworkPackageName}@${frameworkVersion}`,
);
}

Expand All @@ -106,7 +129,7 @@ export class AddPlatformService implements IAddPlatformService {

private async installPackage(
projectDir: string,
packageName: string
packageName: string,
): Promise<string> {
const frameworkDir = this.resolveFrameworkDir(projectDir, packageName);
if (frameworkDir && this.$fs.exists(frameworkDir)) {
Expand All @@ -122,7 +145,7 @@ export class AddPlatformService implements IAddPlatformService {
dev: true,
"save-dev": true,
"save-exact": true,
} as any
} as any,
);

if (!installedPackage.name) {
Expand Down Expand Up @@ -172,7 +195,7 @@ export class AddPlatformService implements IAddPlatformService {
} catch (err) {
this.$logger.trace(
`Couldn't resolve installed framework. Continuing with install...`,
err
err,
);
}
return null;
Expand All @@ -183,36 +206,36 @@ export class AddPlatformService implements IAddPlatformService {
platformData: IPlatformData,
projectData: IProjectData,
frameworkDirPath: string,
frameworkVersion: string
frameworkVersion: string,
): Promise<void> {
// here we should use ios OR android
const platformDir =
this.$options.hostProjectPath ??
path.join(
projectData.platformsDir,
platformData.normalizedPlatformName.toLowerCase()
platformData.normalizedPlatformName.toLowerCase(),
);

this.$fs.deleteDirectory(platformDir);
//if iosHost - dont create project
await platformData.platformProjectService.createProject(
path.resolve(frameworkDirPath),
frameworkVersion,
projectData
projectData,
);
Comment on lines 212 to 225

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not delete a caller-provided hostProjectPath.

Line 219 deletes this.$options.hostProjectPath when it is set. For host-project flows, that path can be an existing native project outside platforms/, so platform add can erase user-owned files before createProject runs.

Proposed guard
-		const platformDir =
-			this.$options.hostProjectPath ??
-			path.join(
-				projectData.platformsDir,
-				platformData.normalizedPlatformName.toLowerCase(),
-			);
-
-		this.$fs.deleteDirectory(platformDir);
-		//if iosHost - dont create project
-		await platformData.platformProjectService.createProject(
-			path.resolve(frameworkDirPath),
-			frameworkVersion,
-			projectData,
-		);
+		const hostProjectPath = this.$options.hostProjectPath;
+		const platformDir = path.join(
+			projectData.platformsDir,
+			platformData.normalizedPlatformName.toLowerCase(),
+		);
+
+		if (!hostProjectPath) {
+			this.$fs.deleteDirectory(platformDir);
+			await platformData.platformProjectService.createProject(
+				path.resolve(frameworkDirPath),
+				frameworkVersion,
+				projectData,
+			);
+		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const platformDir =
this.$options.hostProjectPath ??
path.join(
projectData.platformsDir,
platformData.normalizedPlatformName.toLowerCase()
platformData.normalizedPlatformName.toLowerCase(),
);
this.$fs.deleteDirectory(platformDir);
//if iosHost - dont create project
await platformData.platformProjectService.createProject(
path.resolve(frameworkDirPath),
frameworkVersion,
projectData
projectData,
);
const hostProjectPath = this.$options.hostProjectPath;
const platformDir = path.join(
projectData.platformsDir,
platformData.normalizedPlatformName.toLowerCase(),
);
if (!hostProjectPath) {
this.$fs.deleteDirectory(platformDir);
await platformData.platformProjectService.createProject(
path.resolve(frameworkDirPath),
frameworkVersion,
projectData,
);
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/services/platform/add-platform-service.ts` around lines 212 - 225, The
platform add flow in add-platform-service.ts is deleting a caller-provided host
project path when $options.hostProjectPath is set, which can erase an existing
native project outside platforms/. Update the logic around the platformDir
computation and the deleteDirectory call so only internally managed platform
directories are cleaned up, and skip deletion when hostProjectPath is provided
before platformData.platformProjectService.createProject runs.

platformData.platformProjectService.ensureConfigurationFileInAppResources(
projectData
projectData,
);
await platformData.platformProjectService.interpolateData(projectData);
platformData.platformProjectService.afterCreateProject(
platformData.projectRoot,
projectData
projectData,
);
}

private async trackPlatformVersion(
frameworkVersion: string,
platformData: IPlatformData
platformData: IPlatformData,
): Promise<void> {
await this.$analyticsService.trackEventActionInGoogleAnalytics({
action: TrackActionNames.AddPlatform,
Expand Down
10 changes: 8 additions & 2 deletions lib/services/prepare-data-service.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import { IOSPrepareData, AndroidPrepareData } from "../data/prepare-data";
import {
IOSPrepareData,
AndroidPrepareData,
WindowsPrepareData,
} from "../data/prepare-data";
import { injector } from "../common/yok";
import { IOptions } from "../declarations";

export class PrepareDataService implements IPrepareDataService {
constructor(private $mobileHelper: Mobile.IMobileHelper) {}

public getPrepareData(projectDir: string, platform: string, data: IOptions) {
const platformLowerCase = platform.toLowerCase();
const platformLowerCase = platform && platform.toLowerCase();

if (this.$mobileHelper.isApplePlatform(platform)) {
return new IOSPrepareData(projectDir, platformLowerCase, data);
} else if (this.$mobileHelper.isAndroidPlatform(platform)) {
return new AndroidPrepareData(projectDir, platformLowerCase, data);
} else if (this.$mobileHelper.isWindowsPlatform(platform)) {
return new WindowsPrepareData(projectDir, platformLowerCase, data);
}
}
}
Expand Down
Loading