Skip to content

feat(prepare): add a missing App_Resources/<Platform> from the default template - #6173

Merged
triniwiz merged 2 commits into
feat/windowsfrom
feat/windows-app-resources
Oct 23, 2026
Merged

triniwiz merged 2 commits into
feat/windowsfrom
feat/windows-app-resources

Conversation

@triniwiz

Copy link
Copy Markdown
Member

ensureAppResourcesExist only pulls the default template's App_Resources when the app has no App_Resources folder at all. An app created before Windows support has App_Resources/Android and App_Resources/iOS but no Windows folder, so adding the platform meant copying the folder over by hand.

Changes

  • prepareCore passes the platform's App_Resources folder name (mobileHelper.normalizePlatformName) to ensureAppResourcesExist.
  • When App_Resources exists but that folder doesn't, the CLI copies it from the default template. When the template has no such folder, it logs a warning and continues.
  • With no platform passed, behaviour is unchanged. The template download is factored into getDefaultTemplateAppResourcesDir.

This applies to every platform, not only Windows. For Windows it depends on the default template shipping App_Resources/Windows (NativeScript/nativescript-app-templates#244). Until that's published, the CLI warns instead.

Testing

  • test/project-service.ts: 5 new tests (whole folder missing, platform folder missing, platform folder present, template without the folder, no platform passed). The file passes 15 of 15.
  • Full suite: the same 17 tests in 7 files fail with and without this change (errors, cocoapods, local CLI delegation, plugins, pnpm, bundler compiler, spm, project cleanup). They are pre-existing on this Windows host.
  • Not tested end to end against a published template, since * Use path.resolve for frameworkPath #244 isn't published yet.

…t template

ensureAppResourcesExist only fetched the default template's App_Resources when
the whole folder was missing. An app created before Windows support has
App_Resources/Android and iOS but no Windows folder, so `ns run windows`
needed the folder copied by hand.

Prepare now passes the platform's App_Resources folder name. When the app has
App_Resources but no folder for that platform, the CLI copies it from the
default template, or warns when the template has none.
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fa112fa-4631-4a17-bd46-047d8b582754

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@triniwiz
triniwiz merged commit 7168376 into feat/windows Oct 23, 2026
9 checks passed
@triniwiz
triniwiz deleted the feat/windows-app-resources branch October 23, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant