GeezerVison is showing github.com — feat(prepare): add a missing App_Resources/<Platform> from the default template by triniwiz · Pull Request #6173 · NativeScript/nativescript-cli
Conversation
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…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
Bot
commented
Oct 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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:
- 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|